#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int N,M; cin>>N>>M; vector f(N,vector(N,false)); f[0][0] = true; f.back().back() = true; queue> Q; Q.emplace(0,0); vector ff(N,vector(N,false)); ff[0][0] = true; while(Q.size()>0){ int y = Q.front().first,x = Q.front().second; Q.pop(); rep(i,2){ int yy = y+i,xx = x+(i^1); if(yy>=N||xx>=N)continue; if(ff[yy][xx])continue; ff[yy][xx] = true; cout<>ret; if(ret=="Black"){ f[yy][xx] = true; Q.emplace(yy,xx); } } } vector dp(N,vector(N,false)); dp[0][0] = true; rep(i,N){ rep(j,N){ if(dp[i][j]==false)continue; rep(k,2){ int yy = i+k,xx = j+(k^1); if(yy>=N||xx>=N)continue; if(f[yy][xx]==false)continue; dp[yy][xx] = true; } } } if(dp.back().back())cout<<"Yes"<