#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) typedef long long ll; typedef pair P; typedef pair PP; int main() { ll X, Y; cin >> X >> Y; if(0 == X && 0 == Y) { puts("YES"); return 0; } queue Q; Q.push(PP(0,P(0,0))); // y, x int vy[8] = {-1,1,-2,2,-2,2,-1,1}; int vx[8] = {-2,-2,-1,-1,1,1,2,2}; while(!Q.empty()) { PP pp = Q.front();Q.pop(); ll t = pp.first; ll y = pp.second.first; ll x = pp.second.second; if(t >= 3) continue; FOR(i,0,8) { ll nx = x + vx[i]; ll ny = y + vy[i]; if(nx == X && ny == Y) { puts("YES"); return 0; } Q.push(PP(t+1,P(ny,nx))); } } puts("NO"); return 0; }