#include <bits/stdc++.h>
using namespace std;
long long n, k, l, r, m, R;
char s[10];
bool check(long long l, long long r) {
  printf("%lld %lld\n", l, r);
  fflush(stdout);
  scanf("%s", s);
  return s[0] == 'Y';
}
int main() {
  srand(time(0));
  scanf("%lld%d", &n, &k);
  l = 1, r = n;
  while (1) {
    l = max(1ll, l - k), r = min(n, r + k);
    if (r - l <= 45) {
      R = rand() % (r - l + 1);
      if (check(l + R, l + R)) return 0;
    } else {
      m = l + r >> 1;
      if (check(l, m))
        r = m;
      else
        l = m + 1;
    }
  }
}
