#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
  mt19937 gen(seed);
  long long n, k;
  cin >> n >> k;
  long long l = 1, r = n;
  string s;
  while (true) {
    while (r - l > 50) {
      long long mid = (r + l) / 2;
      cout << l << " " << mid << endl;
      cin >> s;
      if (s[0] == 'B')
        return 0;
      else if (s[0] == 'Y') {
        l = max(1ll, l - k);
        r = min(mid + k, n);
      } else {
        l = max(mid + 1 - k, 1ll);
        r = min(r + k, n);
      }
    }
    long long x = l + gen() % (r - l + 1);
    cout << x << " " << x << endl;
    cin >> s;
    if (s[0] == 'B' or s[0] == 'Y')
      return (0);
    else {
      r = min(r + k, n);
      l = max(1ll, l - k);
    }
  }
  return 0;
}
