#include <bits/stdc++.h>
using namespace std;
long long int n, k;
char s[20], t[20];
long long int rnd() {
  static long long int x = 48382;
  return x = x * 0xdefaced + 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  long long int l = 1, r = n;
  while (r - l > 4 * k) {
    long long int mid = (l + r) / 2;
    cout << l << " " << mid << endl;
    cout.flush();
    cin >> s;
    if (s[0] == 'B') break;
    if (s[0] == 'Y') {
      r = mid + k;
      l = l - k;
      r = min(n, r);
      l = max(1LL, l);
    } else {
      r = r + k;
      l = mid + 1 - k;
      r = min(n, r);
      l = max(1LL, l);
    }
  }
  if (s[0] != 'B')
    while (1) {
      long long int x = rnd() % (r - l + 1);
      x = x > 0 ? x : -x;
      cout << l + x << " " << l + x << endl;
      cout.flush();
      cin >> s;
      if (s[0] == 'B') break;
      if (s[0] == 'Y') {
        break;
      } else {
        r = r + k;
        l = l - k;
        r = min(n, r);
        l = max(1LL, l);
      }
      long long int mid = (l + r) / 2;
      cout << l << " " << mid << endl;
      cout.flush();
      cin >> s;
      if (s[0] == 'B') break;
      if (s[0] == 'Y') {
        r = mid + k;
        l = l - k;
        r = min(n, r);
        l = max(1LL, l);
      } else {
        r = r + k;
        l = mid + 1 - k;
        r = min(n, r);
        l = max(1LL, l);
      }
    }
  return 0;
}
