#include <bits/stdc++.h>
const long long inf = std::numeric_limits<long long>::max();
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  long long n, k;
  string st;
  cin >> n >> k;
  long long l, r;
  l = 0;
  r = n - 1;
  while (st.size() != 3) {
    while (r - l > 4 * k + 3) {
      long long mid = (l + r) / 2;
      cout << mid + 1 << ' ' << r + 1 << endl;
      cin >> st;
      if (st.size() == 3) {
        mid -= k;
        l = max(mid, 0LL);
        r += k;
        r = min(r, n - 1);
      } else {
        mid += k;
        r = min(mid, n - 1);
        l -= k;
        l = max(l, 0LL);
      }
    }
    long long te = rng() % (r - l + 1);
    cout << l + te + 1 << ' ' << l + te + 1 << endl;
    cin >> st;
    r += k;
    r = min(r, n - 1);
    l -= k;
    l = max(l, 0LL);
    if (st[0] == 'B') {
      return 0;
    }
  }
  return 0;
}
