#include #include #include using namespace std; using ll = long long; #include int cnt = 0; int ask(int i,int j){ if(cnt==3000){ cout<<"No"<>s; assert(s!="-1"); if(s=="Black") return 1; return 0; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin>>n>>m; vector> que; que.push_back(make_pair(0,0)); vector> vis(n,vector(n,0)); vis[0][0] = 1; int dx[] = {1,-1,0,0}; int dy[] = {0,0,1,-1}; for(int i = 0;i=n||nnj<0||nnj>=n) continue; if(vis[nni][nnj]!=0) continue; vis[nni][nnj] = -1; int p = ask(nni,nnj); if(p==1){ vis[nni][nnj] = 1; que.push_back(make_pair(nni,nnj)); if(nni==n-1&&nnj==n-1){ cout<<"Yes"<