#include #include #include #define pii pair using namespace std; int dx[]={-2, -2, -1, -1, 1, 1, 2, 2}; int dy[]={-1, 1, -2, 2, -2, 2, -1, 1}; int main(void){ int X,Y; cin>>X>>Y; unsigned long long P[X+1][Y+1]; for(int i=0;i<=X;i++){ for(int j=0;j<=Y;j++) P[i][j]=0; } queue q; q.push(pii(X,Y)); while(!q.empty()){ pii p=q.front(); q.pop(); int x=p.first,y=p.second; for(int i=0;i<8;i++){ int nx=x+dx[i],ny=y+dy[i]; if(nx<0 || ny<0 || nx>X || ny>Y) continue; if(!P[nx][ny]) continue; q.push(pii(nx,ny)); P[nx][ny]=P[x][y]+1; } } if(P[X][Y]<=3) cout<<"YES"<