#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFLL = 1e18;
const int MOD = 1e9 + 7;
const int MAXN = 2e5 + 5;
long long n, k;
char s[5];
bool query(long long l, long long r) {
  printf("%lld %lld\n", l, r);
  fflush(stdout);
  scanf("%s", s);
  if (s[0] == 'B') assert(0);
  if (s[0] == 'Y') return true;
  return false;
}
int main() {
  srand(time(NULL));
  mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  scanf("%lld %lld", &n, &k);
  long long l = 1, r = n;
  while (1) {
    if (r - l + 1 <= 4 * k + 4) {
      long long x = rand() % (r - l + 1);
      if (query(l + x, l + x)) return 0;
    } else {
      long long mid = (l + r) / 2;
      if (query(l, mid))
        r = mid;
      else
        l = mid + 1;
    }
    l = max(1LL, l - k);
    r = min(n, r + k);
  }
  return 0;
}
