#include <bits/stdc++.h>
using namespace std;
long long K, statc;
int qc;
bool query(long long l, long long r) {
  qc++;
  assert(qc <= 4499);
  cout << l << " " << r << '\n';
  fflush(stdout);
  string ans;
  cin >> ans;
  if (l == r && ans[0] == 'Y') {
    exit(0);
  }
  if (ans[0] == 'B') {
    exit(0);
  }
  return ans[0] == 'Y';
}
long long randrange(long long l, long long r) {
  long long mod = r - l + 1;
  return l + rand() % mod;
}
long long extl(long long x) { return max(1LL, x - K); }
long long extr(long long x) { return min(statc, x + K); }
int main() {
  srand(time(NULL));
  ios::sync_with_stdio(false);
  cin >> statc >> K;
  long long l = 1, r = statc;
  while (true) {
    long long w = r - l + 1;
    if (w <= 7 * K) {
      long long guess = randrange(l, r);
      query(guess, guess);
    } else {
      long long mid = (l + r) / 2;
      if (query(l, mid)) {
        r = mid;
      } else {
        l = mid + 1;
      }
    }
    l = extl(l);
    r = extr(r);
  }
}
