#include <bits/stdc++.h>
using namespace std;
char s[5];
int main() {
  long long l, r, mid, n;
  int k, num;
  bool gus;
  scanf("%lld%d", &n, &k);
  l = 1;
  r = n;
  srand((unsigned)time(0));
  if (!k) {
    while (true) {
      mid = (l + r) >> 1;
      printf("%lld %lld\n", l, mid);
      fflush(stdout);
      scanf("%s", s);
      if (s[0] == 'B') {
        return 0;
      } else if (s[0] == 'Y') {
        if (l == r) return 0;
        r = mid;
      } else {
        l = mid + 1;
      }
    }
  } else {
    while (true) {
      mid = (l + r) >> 1;
      gus = false;
      if (r - l <= 50) {
        num = rand() % (r - l + 1);
        gus = true;
        printf("%lld %lld\n", l + num, l + num);
        fflush(stdout);
        if (!num) ++l;
        if (num == r - l) --r;
      } else {
        printf("%lld %lld\n", l, mid);
        fflush(stdout);
      }
      scanf("%s", s);
      if (s[0] == 'B') {
        return 0;
      } else if (s[0] == 'Y') {
        if (gus)
          return 0;
        else {
          l = ((1) > (l - k) ? (1) : (l - k));
          r = ((n) < (mid + k) ? (n) : (mid + k));
        }
      } else {
        if (gus) {
          l = ((1) > (l - k) ? (1) : (l - k));
          r = ((n) < (r + k) ? (n) : (r + k));
        } else {
          l = ((1) > (mid + 1 - k) ? (1) : (mid + 1 - k));
          r = ((n) < (r + k) ? (n) : (r + k));
        }
      }
    }
  }
  return 0;
}
