#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  srand(time(0));
  ll t = 1;
  while (t--) {
    ll n, k, p;
    cin >> n >> k;
    ll l = 1, r = n, mid;
    char s[10];
    while (true) {
      l = max(l - k, 1LL);
      r = min(r + k, n);
      if ((r - l) <= 4 * k + 1) {
        ll temp = rand() % (r - l + 1) + l;
        printf("%lld %lld\n", temp, temp);
        fflush(stdout);
        scanf("%s", s);
        if (s[0] == 'Y') {
          return 0;
        }
      } else {
        mid = (l + r) / 2;
        printf("%lld %lld\n", l, mid);
        fflush(stdout);
        scanf("%s", s);
        if (s[0] == 'Y') {
          r = mid;
        } else {
          l = mid + 1;
        }
      }
    }
  }
  return 0;
}
