#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } bool debug = false; vector cnt; int query(int x) { if (debug) { return cnt[x - 1]; } else { cout << "? " << x << endl; int c; cin >> c; return c; } } random_device rd; mt19937 mt(rd()); int main() { fast_io(); int t = 1; for (; t--;) { int n; if (debug) { uniform_int_distribution dist(2, 100); n = dist(mt); } else { cin >> n; } if (debug) { cnt.resize(n); uniform_int_distribution dist(1, n - 1); for (int i = 0; i < n; i++) { cnt[i] = dist(mt); } sort(cnt.begin(), cnt.end()); } int l = 1, r = n; int lcnt = query(l); int rcnt = query(r); //[l, r]に同じ値が含まれる for (int i = 0; i < 8; i++) { if (rcnt - lcnt >= r - l) { cout << n << " " << l << " " << r << endl; for (int i = 0; i < n; i++) { cout << cnt[i] << " "; } cout << endl; assert(rcnt - lcnt < r - l); } if (l + 1 == r) { int c = query(l); continue; } int mid = (l + r) / 2; int c = query(mid); if (c - lcnt < mid - l) { r = mid; rcnt = c; } else { l = mid; lcnt = c; } } cout << "Yes " << l << " " << r << endl; if (debug) { if (cnt[l - 1] != cnt[r - 1]) { for (int i = 0; i < n; i++) { cout << cnt[i] << " "; } cout << endl; return 0; } } } }