#include <bits/stdc++.h>
using namespace std;
long long N;
int K;
long long lo, hi;
void query(long long clo, long long chi) {
  cout << clo << " " << chi << endl;
  string c;
  cin >> c;
  if (clo == chi && c[0] == 'Y') exit(0);
  if (lo == clo) {
    if (c[0] == 'Y')
      hi = chi;
    else
      lo = chi + 1;
  }
  lo = max(1LL, lo - K);
  hi = min(N, hi + K);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N >> K;
  lo = 1;
  hi = N;
  srand(time(NULL));
  while (true) {
    long long mid = (lo + hi) / 2;
    query(lo, mid);
    long long r = rand() % (hi - lo + 1);
    query(hi - r, hi - r);
  }
}
