#include <bits/stdc++.h>
using namespace std;
void solve();
mt19937 rng(time(0));
void init() {}
template <class T>
T read() {
  int ch = getchar();
  if (ch == EOF) {
    return INT_MIN;
  }
  while (!isdigit(ch) && ch != '-') {
    ch = getchar();
    if (ch == EOF) {
      return INT_MIN;
    }
  }
  T res = 0, sign = 1;
  if (ch == '-') {
    ch = getchar();
    sign = -1;
  }
  while (isdigit(ch)) {
    res = res * 10 + ch - '0';
    ch = getchar();
  }
  return res * sign;
}
int main() {
  init();
  solve();
  return 0;
}
bool query(long long l, long long r) {
  printf("%I64d %I64d\n", l, r);
  fflush(stdout);
  char qres[10];
  scanf("%s", qres);
  if (qres[0] == 'B') {
    exit(0);
  }
  return qres[0] == 'Y';
}
void extend(long long& l, long long& r, long long n, long long k) {
  l = max(1LL, l - k);
  r = min(n, r + k);
}
void solve() {
  long long n = read<long long>(), k = read<long long>();
  long long l = 1, r = n;
  for (;;) {
    if (r != l && r - l + 1LL >= 6LL * k) {
      long long mid = (l + r) / 2LL;
      if (query(l, mid)) {
        r = mid;
      } else {
        l = mid + 1LL;
      }
      extend(l, r, n, k);
    } else {
      long long x = l + (rng() % (r - l + 1LL));
      if (query(x, x)) {
        return;
      }
      extend(l, r, n, k);
    }
  }
}
