#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; int main() { ll X, Y; cin >> X >> Y; if(0 == X && 0 == Y) { puts("YES"); return 0; } queue<PP> 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; }