#include using namespace std; using ll =long long; #define rep(i,N) for(int (i)=0;(i)<(N);++(i)) #define SORT(i) sort((i).begin(),(i).end()) constexpr ll INF = 2000000000; constexpr ll mod = 10e8 + 7; int main() { int x, y; cin >> x >> y; int cy[8] = { -1,1,-2,2,-2,2,-1,1 }; int cx[8] = { -2,-2,-1,-1,1,1,2,2 }; queue>que; queuedist; que.push(make_pair(0, 0)); dist.push(0); int ny, nx; while (!que.empty()) { pairN = que.front(); que.pop(); int d = dist.front(); dist.pop(); int a; if (d == 4)break; rep(i, 8) { nx = N.first + cx[i], ny = N.second + cy[i]; a = d + 1; if (nx == x && ny == y) { cout << "YES" << "\n"; return 0; } que.push(make_pair(nx, ny)); dist.push(a); } } cout << "NO" << "\n"; return 0; }