#include #include using namespace std; using i32 = int; using u32 = unsigned int; using i64 = long long; using u64 = unsigned long long; #define FAST_IO \ ios::sync_with_stdio(false); \ cin.tie(0); const i64 INF = 1001001001001001001; using Modint = atcoder::static_modint<998244353>; int ask(int i) { cout << "? " << i << endl; int ret; cin >> ret; return ret; } void answerYes(int i, int j) { cout << "Yes " << i << " " << j << endl; } void answerNo() { cout << "No" << endl; } int main() { FAST_IO // 1 2 3 4 5 6 7 8 // 1 1 2 3 4 5 6 7 int N; cin >> N; int l = 0; int r = N; while (r - l > 1) { int m = (l + r) / 2; int a = ask(m); if (a == m) { l = m; } else { r = m; } } if (l == 0) { answerNo(); } else { answerYes(l, r); } }