#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int k, intv;
long long n, l, r;
long long len() { return r - l + 1; }
bool query(long long a, long long b) {
  cout << a << ' ' << b << '\n';
  cout.flush();
  string resp;
  cin >> resp;
  if (resp == "Yes") {
    if (a == b) exit(0);
    return true;
  } else if (resp == "No") {
    return false;
  }
  assert(false);
}
void reduce_to_intv() {
  while (len() > intv) {
    long long m = (l + r) / 2;
    bool a = query(l, m);
    if (a)
      l = max(1LL, l - k), r = min(n, m + k);
    else
      l = max(1LL, m + 1 - k), r = min(n, r + k);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  l = 1, r = n;
  intv = k * 5;
  while (1) {
    reduce_to_intv();
    long long m = l + rng() % len();
    query(m, m);
    l = max(1LL, l - k), r = min(n, r + k);
  }
}
