#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100009;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
bool query(long long l, long long r) {
  cout << l << " " << r << endl;
  cout.flush();
  string s;
  cin >> s;
  if (s[0] == 'B') exit(0);
  if (s[0] == 'Y' && l == r) exit(0);
  return s[0] == 'Y';
}
signed main() {
  long long n, l, r, k;
  cin >> n >> k;
  l = 1;
  r = n;
  while (true) {
    long long len = r - l + 1;
    if (len > 5 * k) {
      long long m = (l + r) / 2;
      if (query(l, m)) {
        r = m;
      } else {
        l = m + 1;
      }
    } else {
      long long x = l + rng() % len;
      if (query(x, x)) return 0;
    }
    l = max(1LL, l - k);
    r = min(n, r + k);
  }
}
