#include #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)<>gx>>gy; queue> q; q.push({0,0}); string ans="NO"; while(!q.empty()){ int x=q.front().F,y=q.front().S; q.pop(); if(x==gx && y==gy) ans="YES"; if(x==6 && y==3) break; REP(i,0,8) q.push({x+dx[i],y+dy[i]}); } p(ans); return 0; }