#include <bits/stdc++.h>
using namespace std;
char s1[10];
bool query(long long int lft, long long int rgt) {
  printf("%lld %lld\n", lft, rgt);
  fflush(stdout);
  scanf("%s", s1);
  return (s1[0] == 'Y');
}
int main() {
  int i, j, t1, t2, t3, t4, k;
  long long int n, mid, low, high, buf1, buf2, buf3, siz;
  scanf("%lld %d", &n, &k);
  srand(time(NULL));
  low = 1;
  high = n;
  siz = min(100ll, n);
  while (low <= high) {
    buf1 = high - low + 1;
    if (buf1 <= siz) {
      t1 = rand() % buf1;
      if (query(low + t1, low + t1)) {
        return 0;
      } else {
        low = max(low - k, 1ll);
        high = min(high + k, n);
      }
    } else {
      mid = low + (high - low) / 2;
      if (query(low, mid)) {
        low = max(low - k, 1ll);
        high = min(mid + k, n);
      } else {
        low = max(mid + 1 - k, 1ll);
        high = min(high + k, n);
      }
    }
  }
  return 0;
}
