# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 4 * k + 3LL) {
            ll t = l + ((ll)(rand()) % (4 * k + 3LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
            forn(i, intm - 1)
                int x = 23;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
        cnt++;
//        if(cnt > 4490)
//            forn(i, intm - 1)
//                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = max(1LL, min(n, (l + r) / 2LL));
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            ll t = l + (rand() % (r - l + 1LL));
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            forn(i, intm - 1)
                int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1LL, r = n + 1LL, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(mid - l < 2 * k + 2) {
            ll t = l + ((ll)(rand()) % (2 * k + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - k);
            r = min(n, r + k);
        }
        cnt++;
//        if(cnt > 4490)
//            forn(i, intm - 1)
//                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < k + 1LL) {
            ll t = l + ((ll)(rand()) % (r - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            //if(t < 1LL || t > n) {
            //    forn(i, intm - 1)
            //        int x = 234;
            //}
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
//            if(l < 1LL || l > n || mid < 1LL || mid > n)
//                forn(i, intm - 1)
//                    int x = 234;
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < k + 3LL) {
            ll t = l + ((ll)(rand()) % (k + 3LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
        cnt++;
        if(cnt > 4490)
            forn(i, intm - 1)
                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 4 * k + 3LL) {
            ll t = l + ((ll)(rand()) % (3 * k + 3LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            if(guess) {
                l = max(1LL, l - k);
                r = min(n, r + k);
            }
            else {
                l = max(1LL, l - k);
                r = min(n, r + k);
            }
        }
        cnt++;
        if(cnt > 4490)
            forn(i, intm - 1)
                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1LL, r = n + 1LL, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(mid - l < k + 2) {
            ll t = l + ((ll)(rand()) % (mid - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            if(guess) {
                l = max(1LL, l - k);
                r = min(n, r + k);
            }
            else {
                l = max(1LL, l - k);
                r = min(n, r + k);
            }
        }
        cnt++;
        if(cnt > 4490)
            forn(i, intm - 1)
                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1LL, r = n + 1LL, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = false;
        if(r - l < 50) {
            ll t = l + ((ll)(rand()) % (r - l + 1));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            if(guess) {
                l = max(1LL, l - k - 1);
                r = min(n, r + k + 1);
            }
            else {
                l = max(1LL, mid - k - 1);
                r = min(n, r + k + 1);
            }
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1LL, r = n + 1LL, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 50) {
            ll t = l + ((ll)(rand()) % (50));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - k - 1);
            r = mid;
            r = min(n, r + k + 1);
        }
        cnt++;
//        if(cnt > 4490)
//            forn(i, intm - 1)
//                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1LL, r = n + 1LL, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 50) {
            ll t = l + ((ll)(rand()) % (50));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - k);
            r = min(n, r + k);
        }
        cnt++;
//        if(cnt > 4490)
//            forn(i, intm - 1)
//                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            ll t = l + (rand() % (r - l + 1LL));
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            forn(i, intm - 1)
                int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2LL * k + 3LL) {
            ll t = l + ((ll)(rand()) % (r - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            //if(t < 1LL || t > n) {
            //    forn(i, intm - 1)
            //        int x = 234;
            //}
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            if(l < 1LL || l > n || mid < 1LL || mid > n)
                forn(i, intm - 1)
                    int x = 234;
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2LL * k + 3LL) {
            ll t = l + ((ll)(rand()) % (r - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            if(t < 1LL || t > n) {
                forn(i, intm - 1)
                    int x = 234;
            }
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    int cnt = 0;
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 4 * k + 3LL) {
            ll t = l + ((ll)(rand()) % (4 * k + 3LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
            forn(i, intm - 1)
                int x = 23;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            //forn(i, intm - 1)
            //    int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
        cnt++;
        if(cnt > 4490)
//            forn(i, intm - 1)
//                int x = 23;
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n, mid;
    string s;
    srand(time(0));
    while(l < r) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            int t = rand() % (2 * k + 3) + 1;
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            while(true)
                int x = 234;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n, mid;
    string s;
    srand(time(0));
    while(l < r) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            ll t = l + ((ll)rand() % (2LL * k + 3LL));
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n, mid;
    string s;
    srand(time(0));
    while(l < r) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            int t = rand() % (2 * k + 3) + 1;
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad")
            return 0;
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - k);
            r = min(n, r + k);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2LL * k + 3LL) {
            ll t = l + ((ll)(rand()) % (r - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            forn(i, intm - 1)
                int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            ll t = l + (rand() % (r - l + 1LL));
            t = min(t, n);
            t = max(1LL, t);
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            forn(i, intm - 1)
                int x = 2;
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


# pragma GCC optimize ("O0")
//# pragma GCC optimize ("O3")
//# pragma GCC optimize ("Ofast")
//# pragma GCC optimize ("unroll-loops")

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define UN -1
#define VIS -2
#define EX -3
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define pob pop_back()
#define puf push_front
#define pof pop_front()
#define clr(a) (a).clear()
#define sz(a) (int)(a).size()
#define forn(t, n) for(int t = 0; t < n; t++)
#define foren(t, n) for(int t = 1; t <= n; t++)
#define llm LONG_LONG_MAX
#define llmn LONG_LONG_MIN
#define intm INT_MAX
#define intmn INT_MIN
#define dblm DBL_MAX
#define dblmn DBL_MIN
#define mod 1000000007
#define mod2 1000000009
#define mil 1111111
#define bil 1111111111
#define pi M_PI
#define euler 2.718281828459
#define eps 1e-12
#define degrad (pi/180.0)
#define raddeg (180.0/pi)
#define uset unordered_set
#define umap unordered_map
#define DBG(x) cout << #x << ": " << x << "\n";
#define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
typedef long long ll;
typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<pll> vpll;
typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi;
typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; typedef pair<ll, pll> tll;
typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<char> vc; typedef vector<vc> vvc;
typedef vector<bool> vb; typedef vector<vb> vvb; typedef queue<int> qi; typedef queue<ll> qll;
typedef queue<ii> qii; typedef vector<tll> vtll; typedef vector<iii> viii; typedef pair<pll, pll> ppll;
typedef priority_queue<int> pqi; typedef priority_queue<ll> pqll;
typedef pair<int, ii> iii; typedef vector<iii> viii; typedef vector<string> vs;
typedef vector<double> vd; typedef pair<double, double> dd; typedef vector<dd> vdd; typedef pair<ii, int> riii;
typedef vector<vector<double> > vvd; typedef vector<vvi> vvvi;

template<class T> void pv(vector<T> &vec) { forn(i, sz(vec)) cout << vec[i] << (i == sz(vec) - 1 ? '\n' : ' '); }

//ifstream in("/home/danza/CLionProjects/codeforces/in.in");
//ofstream out("/home/danza/CLionProjects/codeforces/out.out");
//#define cin in
//#define cout out

int main() { fio
    ll n, k;
    cin >> n >> k;
    ll l = 1, r = n + 1, mid;
    string s;
    srand(time(0));
    while(true) {
        mid = (l + r) / 2LL;
        bool guess = l == mid;
        if(r - l < 2 * k + 3) {
            ll t = l + (rand() % (r - l + 1LL));
            cout << t << ' ' << t << endl;
            guess = true;
        }
        else {
            cout << l << ' ' << mid << endl;
        }
        cin >> s;
        if(s == "Bad") {
            return 0;
        }
        if(s == "Yes") {
            if(guess)
                return 0;
            l = max(1LL, l - k);
            r = min(n, mid + k);
        }
        else {
            l = max(1LL, l - 2 * k - 1);
            r = min(n, r + 2 * k + 1);
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    cout.flush();
    string s;
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(10534046);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (5 * k + 1)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t2, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    cout.flush();
    string s;
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(10534046);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (5 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t2, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, m, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    fflush(stdout);
    cin >> s;
    if(s == "BAD")
        exit(0);
    else if(s == "YES")
        return true;
    else
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> m >> k;
    srand(123456);
    ll left = 0, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, m, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    fflush(stdout);
    cin >> s;
    if(s == "BAD")
        exit(0);
    else if(s == "YES")
        return true;
    else
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> m >> k;
    srand(123456);
    ll left = 0, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = mid;
            else
                templ = mid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    fflush(stdout);
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(123456);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (4 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t2, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, m, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    //fflush(stdout);
    cin >> s;
    if(s == "BAD")
        exit(0);
    else if(s == "YES")
        return true;
    else
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> m >> k;
    srand(123456);
    ll left = 0, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    //fflush(stdout);
    cin >> s;
    if(s == "BAD")
        exit(0);
    else if(s == "YES")
        return true;
    else
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(123456);
    ll left = 0, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    fflush(stdout);
    cin >> s;
    if(s == "BAD")
        exit(0);
    else if(s == "YES")
        return true;
    else
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(123456);
    ll left = 0, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    //fflush(stdout);
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(123456);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (4 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t2, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;
string s;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    fflush(stdout);
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(123456);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (2 * k)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t1, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pair <int, int> > vpi;
typedef vector<pair<ll, ll> > vpl;
#define pb emplace_back
#define mp make_pair
#define all(p) (p).begin(), (p).end()
#define allr(p) (p).rbegin(), (p).rend()
#define sp fixed << setprecision
#define f first
#define s second
const ll MOD = 1e9 + 7;
const ll INF = 1e15 + 7;
const ll N = 1e6;

ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll mult(ll a, ll b, ll p = MOD) {return (ll)((a % p) * (b % p))% p;}
vl prime(N + 1);
void sieve() {
    prime[0] = prime[1] = 1;
    for(ll i = 2; i <= N; i++) {
        if(!prime[i]) {
            prime[i] = i;
            for(ll j = i * i; j <= N; j += i)
                if(!prime[j])
                    prime[j] = i;
        }
    }
}

ll n, k;

bool query(ll l, ll r) {
    cout << l << " " << r << "\n";
    cout.flush();
    string s;
    cin >> s;
    if(s[0] == 'B')
        exit(0);
    else if(s[0] == 'Y')
        return true;
    else if(s[0] == 'N')
        return false;
}

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
    clock_t tStart = clock();

    cin >> n >> k;
    srand(12345656);
    ll left = 1ll, right = n;
    while(true) {
        ll templ = left, tempr = right;
        while((tempr - templ) > (5 * k + 1)) {
            ll tempmid = (tempr + templ) / 2;

            if(query(templ, tempmid))
                tempr = tempmid;
            else
                templ = tempmid;

            templ = max(1ll, templ - k);
            tempr = min(n, tempr + k);
        }

        ll t1 = tempr - templ + 1;
        ll t2 = templ + (ll)rand() % t1;
        if(query(t2, t2))
            return 0;
        else {
            left = max(1ll, templ - k);
            right = min(n, tempr + k);
        }
    }

    cerr << "Time Elapsed : " << sp(10) << (double)(clock() - tStart)/CLOCKS_PER_SEC << "\n";
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;
pair<int, int> history[4500];

int main() {
    cin >> n >> k;
    long long L = 1, R = n, m, i = 0, l, r;
    while(l <= r) {
//        printf("L:%lld R:%lld\n", L, R);
        l = L;
        r = L + (R - L) / 2;
        m = l + (r - l) / 2;
        if (abs(l - r) <= k) {
            int guess = rand() % k + 1;
            cout << guess << " " << guess << endl;
        } else {
            cout << l << " " << r << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (l == r) {
                return 0;
            }
            R = min(n, R - (R - L) / 2 + k);
        } else {
            L = max(0ll, L + (R - L) / 2 - k);
        }
        ++i;
        if (i >= 4500) {
            assert(false);
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;
pair<int, int> history[4500];

int main() {
    cin >> n >> k;
    long long L = 1, R = n, m, i = 0, l, r;
    while(l <= r) {
//        printf("L:%lld R:%lld\n", L, R);
        l = L;
        r = L + (R - L) / 2;
        m = l + (r - l) / 2;
        if (abs(l - r) <= k) {
            int guess = rand() % k + 1;
            cout << guess << " " << guess << endl;
        } else {
            cout << l << " " << r << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            R = min(n, R - (R - L) / 2 + k);
        } else {
            L = max(0ll, L + (R - L) / 2 - k);
        }
        ++i;
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;

int main() {
    cin >> n >> k;
    long long l = 1, r = n, m, i = 0;
    bool guessing = false;
    while(l <= r) {
//        printf("%lld %lld\n", l, r);
        m = l + (r - l) / 2;
        long long guess = -1;
        if (abs(l - r) <= 50) {
            guessing = true;
            guess = l + rand() % (r - l);
            cout << guess << " " << guess << endl;
            l = max(1ll, l - k);
            r = min(n, r + k);
        } else {
            if (guessing) {
                guessing = false;
                l = 1;
                r = n;
            }
            m = l + (r - l) / 2;
            cout << l << " " << m << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (guess != -1) {
                return 0;
            }
            l = max(1ll, l - k);
            r = min(n, m + k);
        } else {
            if (guess != -1) {
                continue;
            }
            l = max(1ll, m - k);
            r = min(n, r + k);
        }
        ++i;
        if (i >= 4500) {
            return 0;
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;

int main() {
    cin >> n >> k;
    long long l = 1, r = n, m, i = 0;
    bool guessing = false;
    while(l <= r) {
//        printf("%lld %lld\n", l, r);
        m = l + (r - l) / 2;
        long long guess = -1;
        if (abs(l - r) <= 50) {
            guessing = true;
            guess = l + rand() % (r - l + 1);
            cout << guess << " " << guess << endl;
            l = max(1ll, l - k);
            r = min(n, r + k);
        } else {
            if (guessing) {
                guessing = false;
                l = 1;
                r = n;
            }
            m = l + (r - l) / 2;
            cout << l << " " << m << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (guess != -1) {
                return 0;
            }
            l = max(1ll, l - k);
            r = min(n, m + k);
        } else {
            if (guess != -1) {
                continue;
            }
            l = max(1ll, m - k);
            r = min(n, r + k);
        }
        ++i;
        if (i >= 4500) {
            return 0;
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;

int main() {
    cin >> n >> k;
    long long l = 1, r = n, m, i = 0;
    bool guessing = false;
    while(l <= r) {
        //        printf("%lld %lld\n", l, r);
        m = l + (r - l) / 2;
        long long guess = -1;
        if (r - l <= 50) {
            guessing = true;
            guess = l + (r != l) * rand() % (r - l + 1);
            cout << guess << " " << guess << endl;
            l = max(1ll, l - k);
            r = min(n, r + k);
        } else {
            if (guessing) { // back to bs
                guessing = false;
                l = max(1ll, l - k);
                r = min(n, r + k);
            }
            m = l + (r - l) / 2;
            cout << l << " " << m << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (guessing) { // correct guess
                return 0;
            }
            l = max(1ll, l - k);
            r = min(n, m + k);
        } else {
            if (guessing) { // guess more
                continue;
            }
            l = max(1ll, m - k);
            r = min(n, r + k);
        }
        ++i;
        if (i >= 4500) {
            return 0;
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;
pair<int, int> history[4500];

int main() {
    cin >> n >> k;
    long long L = 1, R = n, m, i = 0, l, r;
    while(l <= r) {
//        printf("L:%lld R:%lld\n", L, R);
        l = L;
        r = L + (R - L) / 2;
        m = l + (r - l) / 2;
        if (abs(l - r) <= k) {
            int guess = rand() % k + 1;
            cout << guess << " " << guess << endl;
        } else {
            cout << l << " " << r << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (l == r) {
                return 0;
            }
            R = min(n, R - (R - L) / 2 + k);
        } else {
            L = max(0ll, L + (R - L) / 2 - k);
        }
        ++i;
        if (i >= 4500) {
            while(1);
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;

int main() {
    cin >> n >> k;
    long long l = 1, r = n, m, i = 0;
    while(l <= r) {
//        printf("%lld %lld\n", l, r);
        m = l + (r - l) / 2;
        long long guess = -1;
        if (abs(l - r) <= 50) {
            guess = l + rand() % (r - l);
            cout << guess << " " << guess << endl;
            l = max(1ll, l - k);
            r = min(n, r + k);
        } else {
            cout << l << " " << m << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (guess != -1) {
                return 0;
            }
            l = max(1ll, l - k);
            r = min(n, m + k);
        } else {
            if (guess != -1) {
                continue;
            }
            l = max(1ll, m - k);
            r = min(n, r + (r - l) + k);
        }
        ++i;
        if (i >= 4500) {
            return 0;
        }
    }
    return 0;
}


#include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <memory.h>
#include <algorithm>
using namespace std;

long long n, k;
string ans;

int main() {
    cin >> n >> k;
    long long l = 1, r = n, m, i = 0;
    bool guessing = false;
    while(l <= r) {
//        printf("%lld %lld\n", l, r);
        m = l + (r - l) / 2;
        long long guess = -1;
        if (r - l <= 50) {
            guessing = true;
            if (r != l) {
                guess = l + rand() % (r - l + 1);
            }
            cout << guess << " " << guess << endl;
            l = max(1ll, l - k);
            r = min(n, r + k);
        } else {
            if (guessing) { // back to bs
                guessing = false;
                l = max(1ll, l - k);
                r = min(n, r + k);
                m = l + (r - l) / 2;
            }
            cout << l << " " << m << endl;
        }
        cout.flush();
        cin >> ans;
        if (ans == "Yes") {
            if (guessing) { // correct guess
                return 0;
            }
            l = max(1ll, l - k);
            r = min(n, m + k);
        } else {
            if (guessing) { // guess more
                continue;
            }
            l = max(1ll, m - k);
            r = min(n, r + k);
        }
        ++i;
        if (i >= 4500) {
            return 0;
        }
    }
    return 0;
}