#include #include #include using namespace std; const int dx[] = { -2, -2, -1, -1, 1, 1, 2, 2 }; const int dy[] = { 1, -1, 2, -2, 2, -2, 1, -1 }; set > reachables; void step(int x, int y, int remain) { reachables.insert(make_pair(x, y)); if (remain == 0) { return; } for (int i = 0; i < 8; ++i) { step(x + dx[i], y + dy[i], remain - 1); } } int main() { step(0, 0, 3); int x, y; cin >> x >> y; bool reachable = reachables.find(make_pair(x, y)) != reachables.end(); cout << (reachable ? "YES" : "NO") << endl; return 0; }