#include using namespace std; struct Vec2D { Vec2D(uint64_t _x, uint64_t _y) : x(_x), y(_y) {} uint64_t x; uint64_t y; }; bool check(const Vec2D pos, const Vec2D targ) { if (pos.x == targ.x && pos.y == targ.y) { return true; } else { return false; } } int main() { uint64_t X, Y; cin >> X >> Y; Vec2D moveList[8] = {Vec2D(-2, -1), Vec2D(-2, 1), Vec2D(-1, -2), Vec2D(-1, 2), Vec2D(1, -2), Vec2D(1, 2), Vec2D(2, -1), Vec2D(2, 1)}; if (X == 0 && Y == 0) { cout << "YES" << endl; return 0; } const Vec2D targ(X, Y); for (int i = 0; i < 8; ++i) { Vec2D p0 = moveList[i]; if (check(p0, targ)) { cout << "YES" << endl; return 0; } for (int j = 0; j < 8; ++j) { Vec2D p1 = p0; p1.x += moveList[j].x; p1.y += moveList[j].y; if (check(p1, targ)) { cout << "YES" << endl; return 0; } for (int k = 0; k < 8; ++k) { Vec2D p2 = p1; p2.x += moveList[k].x; p2.y += moveList[k].y; if (check(p2, targ)) { cout << "YES" << endl; return 0; } } } } cout << "NO" << endl; }