#include <bits/stdc++.h>
using namespace std;
int main() {
  srand(time(NULL));
  long long n;
  int k;
  cin >> n >> k;
  long long l = 1, r = n;
  while (true) {
    if (r - l >= 50) {
      long long m = (l + r) >> 1;
      cout << l << ' ' << m << endl;
      string s;
      cin >> s;
      if (s[0] == 'Y') {
        r = m;
      } else if (s[0] == 'N') {
        l = m + 1;
      } else {
        throw 1;
      }
      l = max((long long)1, l - k);
      r = min(n, r + k);
    } else {
      long long x = rand() % (r - l + 1);
      x += l;
      cout << x << ' ' << x << endl;
      string s;
      cin >> s;
      if (s[0] == 'Y') {
        return 0;
      } else if (s[0] != 'N') {
        throw 1;
      }
      l = max((long long)1, l - k);
      r = min(n, r + k);
    }
  }
  return 0;
}
