#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define inf 0x3f3f3f3f #define INF INT_MAX/3 #define PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) #define CLR(a) memset(a,0,sizeof a) #define pii pair #define pcc pair #define pic pair #define pci pair #define VS vector #define VI vector #define DEBUG(x) cout<<#x<<": "<b?b:a) #define MAX(a,b) (a>b?a:b) #define pi 2*acos(0.0) #define INFILE() freopen("in0.txt","r",stdin) #define OUTFILE()freopen("out0.txt","w",stdout) #define in scanf #define out printf #define ll long long #define ull unsigned long long #define eps 1e-14 #define FST first #define SEC second int dx[] = { -2,-2,-1,-1,1,1,2,2 }; int dy[] = { -1, 1, -2, 2, -2, 2, -1, 1 }; int field[21][21] = {}; void dfs(ll x,ll y,int depth) { if (depth >= 3) return; field[x][y] = true; for (int i = 0; i < 8; ++i) { dfs(x + dx[i], y + dy[i], depth + 1); } } int main() { int X, Y; cin >> X >> Y; if (abs(X) >= 10 or abs(Y) >= 10) { cout << "NO" << endl; return 0; } memset(field, -1, sizeof(field)); field[10][10] = 3; queue q; q.push({ 10,10 }); while (not q.empty()) { auto p = q.front(); q.pop(); int x = p.first, y = p.second; if (field[y][x] == 0) continue; for (int i = 0; i < 8; ++i) { int xx = x + dx[i], yy = y + dy[i]; if (field[yy][xx] == -1 or field[yy][xx] < field[y][x]-1) { field[yy][xx] = field[y][x] - 1; q.push({ xx ,yy }); } } } cout << (field[Y+10][X+10] != -1 ? "YES" : "NO") << endl;; return 0; }