#include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; void query(ll K){ cout << "? " << K << endl; } void ans(ll a, ll b){ cout << "! " << a << " " << b << endl; exit(0); } int main(){ ll N, x, y, z; cin >> N; ll l, r, c; l = 2, r = N; query(1); cin >> x; x = 2*x-1; query(N-1); cin >> y; y = 2*y-(N-1); if (x == y) ans(2, N-1); z = x; while(r-l>1){ c = (r+l)/2; query(c); cin >> x; x =2*x-c; if (x*z == 0){ l = c; r = c; } else if (x*z > 0) l = c; else r = c; } if (l >= N/2) ans(1LL, l); else ans(l+1, N); return 0; }