#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
ll n, k;
bool ok(ll st, ll en) {
  cout << st << " " << en << "\n";
  fflush(stdout);
  string s;
  cin >> s;
  if (s[0] == 'Y') return true;
  if (s[0] == 'N') return false;
  while (true)
    ;
}
void randBetween(ll st, ll en) {
  ll x = st + (rand() % (en - st + 1));
  x = min(n, x);
  x = max(1LL, x);
  if (ok(x, x)) {
    exit(0);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  srand(time(NULL));
  cin >> n >> k;
  ll st = 1, en = n + 1;
  for (int i = 0; i < 4500; i++) {
    ll mid = (st + en) / 2;
    if (en - st <= 100) {
      randBetween(st, en);
    } else {
      if (ok(st, mid)) {
        st = st;
        en = mid;
      } else {
        st = mid;
        en = en;
      }
    }
    st = max(1LL, st - k);
    en = min(n, en + k);
  }
  assert(false);
  return 0;
}
