#include using namespace std; int main(){ int N; cin >> N; cout << "? " << 1 << endl; int S1; cin >> S1; cout << "? " << N - 1 << endl; int S2; cin >> S2; S1 -= 1 - S1; S2 -= N - 1 - S2; if (S1 == S2){ cout << "! " << 2 << ' ' << N - 1 << endl; } else { int tv = 1, fv = N - 1; int p = -1; while (fv - tv > 1){ int mid = (tv + fv) / 2; cout << "? " << mid << endl; int S; cin >> S; S -= mid - S; if (S == 0){ p = mid; break; } else if (S1 > 0 && S > 0 || S1 < 0 && S < 0){ tv = mid; } else { fv = mid; } } if (p == -1){ p = tv; } if (p >= N / 2){ cout << "! " << 1 << ' ' << p << endl; } else { cout << "! " << p + 1 << ' ' << N << endl; } } }