#include #include #include #include #include #include #include #include #include #include #include const int MOD = 1e9 + 7; const int iINF = 100000000; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long int; using P = pair; using edge = struct { int to; int cost; }; int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2}; int dy[8] = {-1, 1, -2, 2, -2, 2, -1, 1}; ll X, Y; int main() { cin >> X >> Y; queue

que; queue num; que.push(P(0, 0)); while (!que.empty()) { P p = que.front(); que.pop(); int cnt = num.front(); num.pop(); if (cnt >= 3) continue; rep(i, 8) { int nx = p.first + dx[i]; int ny = p.second + dy[i]; if (nx == X && ny == Y) { cout << "YES" << endl; return 0; } que.push(P(nx, ny)); num.push(cnt + 1); } } cout << "NO" << endl; return 0; }