#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool ask(ll l, ll r) {
  cout << l << ' ' << r << '\n';
  cout.flush();
  string s;
  cin >> s;
  if (s[0] == 'B') {
    exit(1);
  }
  return s[0] == 'Y';
}
int main() {
  mt19937 mt_rand(time(0));
  ll n, k;
  cin >> n >> k;
  ll l = 1;
  ll r = n;
  ll maxLen = 5 * k + 2;
  while (1) {
    if (r - l + 1 <= maxLen) {
      ll len = r - l + 1;
      ll m = l + mt_rand() % len;
      if (ask(m, m)) {
        return 0;
      }
    } else {
      ll m = (l + r) / 2;
      if (ask(l, m)) {
        if (l == m) return 0;
        r = m;
      } else {
        l = m;
      }
    }
    l = max(1ll, l - k);
    r = min(n, r + k);
  }
  return 0;
}
