// #pragma GCC optimize("O3,unroll-loops") #include // #include using namespace std; #if __cplusplus >= 202002L using namespace numbers; #endif int main(){ cin.tie(0)->sync_with_stdio(0); cin.exceptions(ios::badbit | ios::failbit); int n; cin >> n; auto query = [&](int i)->int{ cout << "? " << i << endl; int x; cin >> x; return x; }; int l = 1, r = n, lx = 1, rx = n - 1, cnt = 0; while(r - l >= 2){ ++ cnt; int m = l + r >> 1; int mx = query(m); if(mx - lx < m - l){ l = m; lx = mx; } else{ r = m; rx = mx; } } while(cnt < 10){ query(1); ++ cnt; } cout << "Yes " << l << " " << r << "\n"; return 0; } /* */