#include <bits/stdc++.h> using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main() { fast_io(); int h, w; cin >> h >> w; if (h == 1 && w == 1) { cout << "1 1" << endl; return 0; } if (h == 1 || w == 1) { cout << "? 1 1" << endl; int d; cin >> d; if (h == 1) { cout << "! 1 " << d - 1 << endl; } else { cout << "! " << d - 1 << " 1" << endl; } return 0; } cout << "? 1 1" << endl; int d1; cin >> d1; cout << "? 1 " << w << endl; int d2; cin >> d2; for (int i = 1; i <= h; i++) { for (int j = 1; j <= w; j++) { int d1_true = (i - 1) * (i - 1) + (j - 1) * (j - 1); int d2_true = (i - 1) * (i - 1) + (w - j) * (w - j); if (d1_true == d1 && d2_true == d2) { cout << "! " << i << " " << j << endl; return 0; } } } }