#include #include #include #include #include #include #include #include #include #include #include #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; int inputValue(){ int a; cin >> a; return a; }; template void output(T a, int precision) { if(precision > 0){ cout << setprecision(precision) << a << "\n"; } else{ cout << a << "\n"; } } // (x-2,y-1),(x-2,y+1),(x-1,y-2),(x-1,y+2),(x+1,y-2),(x+1,y+2),(x+2,y-1),(x+2,y+1) int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2}; int dy[8] = {-1, 1, -2, 2, -2, 2, -1, 1}; int main() { // source code pair> p = make_pair(0, make_pair(inputValue(), inputValue())); queue>> q; q.push(p); while (q.front().first != 4) { auto r = q.front(); q.pop(); if (r.second == make_pair(0, 0)) { output("YES", 0); return 0; } rep(i, 8){ q.push(make_pair(r.first + 1, make_pair(r.second.first + dx[i], r.second.second + dy[i]))); } } output("NO", 0); return 0; }