#include using namespace std; int main() { int T; pair P0, PT; cin >> T >> P0.first >> P0.second >> PT.first >> PT.second; int l = 0, r = T; while (l + 1 < r) { int m = (l + r) >> 1, x, y; cout << "? " << m << endl; cin >> x >> y; int d0 = abs(P0.first - x) + abs(P0.second - y), dT = abs(PT.first - x) + abs(PT.second - y); if (d0 == dT) { cout << "! " << m << endl; break; } else if (d0 < dT) { l = m; } else { r = m; } } cout << "! " << l << endl; }