#include
using namespace std;
int main()
{
double p, x, y;
cout << "x y: "; cin >> x >> y;
if (x>=0) p = ((x<=2)&&(y>=0)&&(y<=2) ? 1: 0);
if (x<=0) p = ((x>=-1)&&(y+1>=x) ? 1: 0);
cout << p << endl; cin.get();
cin.get(); return 0;
}