#include using namespace std; using ll = long long; using ld = long double; using pint = pair; using pll = pair; int N, M; vector dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1}; vector> grid; bool dfs(int h, int w){ if(h == N - 1 && w == N - 1)return true; for(int i = 0; i < 4; i++){ int nh = h + dx[i], nw = w + dy[i]; if(nh < 0 || nh > N - 1 || nw < 0 || nw > N - 1)continue; if(grid[nh][nw] != -1)continue; cout << nh + 1 << " " << nw + 1 << endl; string s; cin >> s; grid[nh][nw] = 1; if(s == "Black"){ if(dfs(nh, nw))return true; } } return false; } int main(){ cin >> N >> M; grid = vector>(N, vector(N, -1)); cout << (dfs(0, 0) ? "Yes": "No") << endl; }