#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int ask = 0; auto rec = [&](auto &&self, int il, int nl, int ir, int nr) -> void { if (il + 1 == ir) { while (ask < 10) { ++ask; cout << "? 1" << endl; } cout << "Yes " << il << ' ' << ir << endl; exit(0); } ++ask; const int ic = (il + ir) / 2; cout << "? " << ic << endl; int resp = 0; cin >> resp; if (resp - nl < ic - il) { self(self, il, nl, ic, resp); } else { self(self, ic, resp, ir, nr); } }; int N; cin >> N; rec(rec, 1, 1, N, N - 1); }