#include <bits/stdc++.h>
using namespace std;
long long ask(long long l, long long r) {
  printf("%I64d %I64d\n", l, r);
  fflush(stdout);
  char ch[7];
  scanf("%s", ch);
  if (ch[0] == 'Y') {
    if (l == r) exit(0);
    return 1;
  }
  return 0;
}
signed main() {
  srand(1929283401);
  long long n, k, p;
  scanf("%I64d%I64d", &n, &k);
  long long l = 1, r = n;
  for (;;) {
    for (; l + 100 < r;) {
      long long md = (l + r) / 2;
      if (ask(l, md))
        r = md + 11;
      else
        l = md - 11;
    }
    l = max(l - 12, 1ll);
    r = min(r + 12, n);
    long long tmp = rand() % (r - l + 1) + l;
    ask(tmp, tmp);
    l = max(l - 12, 1ll);
    r = min(r + 12, n);
  }
  return 0;
}
