#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
const int mod = 1e9 + 7;
bool foo(long long l, long long r) {
  cout << l << " " << r << endl;
  string s;
  cin >> s;
  if (s[0] == 'Y') return true;
  return false;
}
void solve1() {
  srand(time(0));
  long long n, k;
  cin >> n >> k;
  long long l = 1, r = n;
  while (true) {
    long long m = (l + r) / 2;
    if (r - l <= 70) {
      long long x = l + (rand() % (r - l + 1));
      if (foo(x, x)) {
        return;
      }
      l = max(1ll, l - k);
      r = min(n, r + k);
    } else if (foo(l, m)) {
      if (l == r) return;
      l = max(1ll, l - k);
      r = min(n, m + k);
    } else {
      if (l == r) l = 1, r = n;
      r = min(n, r + k);
      l = max(1ll, m - k);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int cghf = 1;
  while (cghf--) {
    solve1();
  }
}
