#include <bits/stdc++.h>
char buf[15];
bool check(long long l, long long r) {
  printf("%lld %lld\n", l, r);
  fflush(stdout);
  scanf(" %s", buf);
  if (buf[0] == 'Y') {
    if (l == r) exit(0);
    return true;
  }
  if (buf[0] == 'N') return false;
  exit(0);
}
long long myrand(long long l, long long r) {
  long long tmp = 1ll * rand() * rand(), len = r - l + 1;
  return l + tmp % len;
}
long long n, k;
int main() {
  srand((unsigned int)time(nullptr));
  scanf("%lld%lld", &n, &k);
  long long l = 1, r = n;
  while (true) {
    if (r - l + 1 <= (k << 2)) {
      long long buf = myrand(l, r);
      if (check(buf, buf))
        return 0;
      else {
        l = std::max(1ll, l - k);
        r = std::min(n, r + k);
      }
    } else {
      long long mid = l + r >> 1;
      if (check(l, mid)) {
        l = std::max(1ll, l - k);
        r = std::min(n, mid + k);
      } else {
        l = std::max(1ll, mid + 1 - k);
        r = std::min(n, r + k);
      }
    }
  }
}
