#include #include #include #include using namespace std; int dr[]={-2, -2, -1, -1, 1, 1, 2, 2}; int dc[]={-1, 1, -2, 2, -2, 2, -1, 1}; int main() { int x, y; cin>>x>>y; pair goal(x, y); queue> q; map, int> v; q.emplace(0, 0); v[make_pair(0, 0)]=0; bool ok=false; while (!q.empty()) { auto p=q.front(); q.pop(); if (p==goal) { ok=true; break; } if (v[p]==3) continue; for(int i=0; i<8; ++i) { auto np=make_pair(p.first+dr[i], p.second+dc[i]); if (v.count(np)) continue; q.emplace(np); v[np]=v[p]+1; } } cout<<(ok ? "YES" : "NO")<