#include <bits/stdc++.h>
using namespace std;
bool ask(long long l, long long r) {
  printf("%lld %lld\n", l, r);
  fflush(stdout);
  char x[4];
  scanf(" %s", x);
  return x[0] == 'Y';
}
long long n, k;
int main() {
  cin >> n >> k;
  long long l = 1, r = n;
  srand(time(0));
  while (1) {
    if (r - l + 1 <= 50) {
      long long q = l + rand() % (r - l + 1);
      if (ask(q, q)) return 0;
      l = max(1LL, l - k);
      r = min(n, r + k);
    } else {
      long long md = l + ((r - l) >> 1);
      if (ask(l, md)) {
        l = max(1LL, l - k);
        r = min(n, md + k);
      } else {
        l = max(1LL, md + 1 - k);
        r = min(n, r + k);
      }
    }
  }
}
