#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>X>>Y; X+=6;Y+=6; if(!CK(X,0,13)||!CK(Y,0,13)){ p("NO"); return 0; } ok[6][6]=true; queue> q; q.push({y,x}); REP(i,0,3){ queue> nq; while(!q.empty()) { y = q.front().first; x = q.front().second; q.pop(); REP(k, 0, 8) { int ny = y + dy[k]; int nx = x + dx[k]; if(ok[ny][nx]) continue; ok[ny][nx] = true; nq.push({ny, nx}); } } q=nq; } p(ok[Y][X]?"YES":"NO"); return 0; }