#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long l, r;
char status[5];
int main() {
  cin >> n >> k;
  srand(time(0));
  l = 1, r = n;
  if (l == r) {
    cout << l << " " << r << endl;
    fflush(stdout);
    cout.flush();
    cin >> status;
    return 0;
  }
  while (true) {
    if (l == r) return 0;
    if (r - l <= (4 * k + 3)) {
      for (int i = 0; i < 5; i++) {
        l = max(1ll, l - k);
        r = min(n, r + k);
        long long val = l + (rand() % (r - l + 1));
        cout << val << " " << val << "\n";
        fflush(stdout);
        cout.flush();
        cin >> status;
        if (status[0] == 'Y')
          return 0;
        else if (status[0] == 'B')
          return 0;
      }
      continue;
    }
    long long lb = max(1ll, l - k);
    long long rb = min(n, r + 2 * k);
    long long i = rb + lb + k - 1;
    i = i >> 1;
    l = lb, r = i;
    cout << l << " " << r << "\n";
    fflush(stdout);
    cout.flush();
    cin >> status;
    if (status[0] == 'Y') {
      if (l == r) return 0;
      continue;
    } else if (status[0] == 'B')
      return 0;
    l = i + 1 - k, r = rb;
    cout << l << " " << r << "\n";
    fflush(stdout);
    cout.flush();
    cin >> status;
    if (status[0] == 'Y') {
      if (l == r) return 0;
      continue;
    } else if (status[0] == 'B')
      return 0;
  }
}
