#include #include #include #include #include #include #include using namespace std; vector mapx; vector mapy; void update(vector& mx, vector& my, long long int x, long long int y, long long int layer){ if(layer <= 0){ return; } mx.push_back(x); my.push_back(y); mx.push_back(x+2); my.push_back(y+1); update(mx, my, x+2, y+1, layer-1); mx.push_back(x+1); my.push_back(y+2); update(mx, my, x+1, y+2, layer-1); mx.push_back(x+2); my.push_back(y-1); update(mx, my, x+2, y-1, layer-1); mx.push_back(x+1); my.push_back(y-2); update(mx, my, x+1, y-2, layer-1); mx.push_back(x-2); my.push_back(y+1); update(mx, my, x-2, y+1, layer-1); mx.push_back(x-1); my.push_back(y+2); update(mx, my, x-1, y+2, layer-1); mx.push_back(x-2); my.push_back(y-1); update(mx, my, x-2, y-1, layer-1); mx.push_back(x-1); my.push_back(y-2); update(mx, my, x-1, y-2, layer-1); } int main(){ //long long int ax =0, ay=0; mapx.push_back(0); mapx.push_back(0); update(mapx, mapy, 0, 0, 3); long long int x, y; cin >> x >> y; bool ans = false; for (long long int i = 0; i < mapx.size(); i += 1) { if(x+mapx[i] == 0 and y+mapy[i]==0) ans = true; //cout << mapx[i] << " , " << mapy[i] << endl; } if(ans){ cout << "YES" << endl; }else { cout << "NO" << endl; } return 0; }