#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double x, y, fx, fy, cx, cy;
cin >> x >> y;
fx = floor(x);
fy = floor(y);
cx = ceil(x);
cy = ceil(y);
if ((cy % 2) && (fx % 2 == 1))
cout << ((x - fx) * (x - fx) + (y - cy) * (y - cy) <= 1) << endl;
if ((cx % 2==1) && (fy % 2))
cout << ((x - cx) * (x - cx) + (y - fy) * (y - fy) <= 1) << endl;
if (!((cy % 2) && (fx % 2 == 1)) && !((cx % 2 == 1) && (fy % 2)))
cout << "false" << endl;
return 0;
}