#include <bits/stdc++.h>
using namespace std;
long long n, k;
bool ok(long long l, long long r) {
  printf("%lld %lld\n", l, r);
  fflush(stdout);
  char ret[10];
  scanf("%s", ret);
  if (ret[0] == 'Y' && l == r) exit(0);
  return ret[0] == 'Y';
}
int main() {
  srand(time(NULL));
  scanf("%lld %lld", &n, &k);
  long long l = 1, r = n;
  while (1) {
    long long sz = r - l + 1;
    if (sz <= 50) {
      long long rnd = 1LL * rand() * rand() % sz;
      ok(l + rnd, l + rnd);
      l = max(1LL, l - k);
      r = min(n, r + k);
    } else {
      long long m = (l + r) / 2;
      if (ok(l, m)) {
        l = max(1LL, l - k);
        r = min(n, m + k);
      } else {
        l = max(1LL, m + 1 - k);
        r = min(n, r + k);
      }
    }
  }
  return 0;
}
