#include <bits/stdc++.h>
using namespace std;
char arr[5];
vector<long long int> vi;
int main() {
  mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  long long int i, j, k, x, y, ans, curr, temp;
  long long int n;
  scanf("%lld %lld", &n, &k);
  long long int low = 1, mid, high = n;
  long long int l = 1, r = n, dist;
  mid = (low + high) / 2;
  while (1) {
    dist = high - low + 1;
    if (dist <= 4 * k + 2) {
      temp = low + rng() % dist;
      printf("%lld %lld\n", temp, temp);
      fflush(stdout);
      scanf("%s", arr);
      if (arr[0] == 'Y') {
        return 0;
      }
    } else {
      printf("%lld %lld\n", low, mid);
      fflush(stdout);
      scanf("%s", arr);
      if (low == mid && arr[0] == 'Y') return 0;
      if (arr[0] == 'Y') {
        high = mid;
      } else {
        low = mid + 1;
      }
    }
    low = max(1LL, low - k);
    high = min(n, high + k);
    mid = (low + high) / 2;
  }
  return 0;
}
