#include using namespace std; typedef tuple TP; const int dx[] = {-2, -2, -1, -1, 1, 1, 2, 2}; const int dy[] = {-1, 1, -2, 2, -2, 2, -1, 1}; int main() { int x, y; cin >> x >> y; queue que; que.emplace(0, 0, 0); while (!que.empty()) { int cx, cy, c; tie(cx, cy, c) = que.front(); que.pop(); for (int i = 0; i < 8; i++) { int nx = cx + dx[i]; int ny = cy + dy[i]; if (nx == x && ny == y) { cout << "YES" << endl; return 0; } if (c != 2) que.emplace(nx, ny, c + 1); } } cout << "NO" << endl; return 0; }