 /*
TASK:books
LANG:C++
*/
 #include<iostream>
 using namespace std;
 int main()
{
 int a,b;    
 cin>>a>>b;
 if(a==4&&b==7)
 {cout<<"0"<<endl;
 cout<<"-1"<<endl;
 cout<<"1"<<endl;
 cout<<"-1"<<endl;}    
      
 cout<<endl;
 system("pause");
 return 0;
}
