#include using namespace std; namespace { typedef double real; typedef long long ll; template ostream& operator<<(ostream& os, const vector& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << vs[i]; return os << "]"; } template istream& operator>>(istream& is, vector& vs) { for (auto it = vs.begin(); it != vs.end(); it++) is >> *it; return is; } int X, Y; void input() { cin >> X >> Y; } void solve() { const int dy[] = {-2, -1, 1, 2, 2, 1, -1, -2}; const int dx[] = {1, 2, 2, 1, -1, -2, -2, -1}; typedef tuple T; queue Q; map, bool> M; M[make_pair(0, 0)] = true; Q.push(T(0, 0, 0)); while (not Q.empty()) { T c = Q.front(); Q.pop(); for (int k = 0; k < 8; k++) { int nx = get<0>(c) + dx[k]; int ny = get<1>(c) + dy[k]; int nc = get<2>(c) + 1; if (nc <= 3) { Q.push(T(nx, ny, nc)); M[make_pair(nx, ny)] = true; } } } cout << (M.count(make_pair(X, Y)) ? "YES" : "NO") << endl; } } int main() { input(); solve(); return 0; }