#include <bits/stdc++.h>
using namespace std;
int main() {
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  long long n, k;
  cin >> n >> k;
  long long x = 1, y = n;
  while (true) {
    x = max(1ll, x - k), y = min(n, y + k);
    long long m, l, r;
    if (y - x + 1 > 5 * k) {
      m = (x + y) / 2;
      l = x, r = m;
    } else {
      m = x + uniform_int_distribution<int>(0, (int)(y - x))(rng);
      l = m, r = m;
    }
    cout << l << ' ' << r << '\n';
    fflush(stdout);
    string s;
    cin >> s;
    if (s == "No") {
      if (y - x + 1 > 5 * k) {
        x = m + 1;
      }
    } else {
      if (l == r) {
        break;
      } else {
        if (y - x + 1 > 5 * k) {
          y = m;
        }
      }
    }
  }
  return 0;
}
