#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (auto i : v) os << i << " ";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (auto i : v) os << i << " ";
  return os;
}
template <typename T>
T read() {
  char c = getchar();
  T sgn = 1;
  T t = 0;
  while (!isdigit(c)) {
    if (c == '-') sgn = -sgn;
    c = getchar();
  }
  while (isdigit(c)) {
    t *= 10;
    t += c - '0';
    c = getchar();
  }
  return t * sgn;
}
long long n, k;
bool check(long long l, long long r) {
  printf("%I64d %I64d\n", l, r);
  fflush(stdout);
  char s[10];
  scanf("%s", s);
  return s[0] == 'Y';
}
int main() {
  srand(time(NULL));
  n = read<long long>();
  k = read<long long>();
  bool ok = false;
  while (!ok) {
    long long l = 1, r = n, mid;
    while (r - l > 50) {
      mid = (l + r) / 2;
      if (check(l, mid)) {
        l = max(1ll, l - k);
        r = min(mid + k, n);
      } else {
        l = max(mid - k + 1, 1ll);
        r = min(r + k, n);
      }
    }
    long long temp = l + rand() % (r - l + 1);
    if (check(temp, temp)) exit(0);
  }
  return 0;
}
