/*
TASK:mob
LANG:C++
*/
#include<iostream>
using namespace std;
int p2[100001];
int main()
{
    int a,b;
    int h;
    int p=2;
    int f=0;
    cin>>a>>b;
    for(int i=a; i<=b; i++)
    {
            h=i;f=0;
            while(h%p==0)
            {
                       while(h!=0)
                       {
                                    p2[f]=h/p;h=h/p;f++;
                       }
                       p++;
                       
            }
                       if(p2[i]==p2[i+1])cout<<0<<endl;
                       else
                       if(p2[i]!=p2[i+1]&&i%2!=0)cout<<1<<endl;
                       else
                       if(p2[i]!=p2[i+1]&&i%2==0)cout<<-1<<endl;
    }
}
