#include using namespace atcoder; #include using namespace std; #define rep(i, n) for(int i=0; i // #define int long long signed main() { int h, w; cin >> h >> w; int ans1, ans2; cout << "? 1 1" << endl; cin >> ans1; cout << "? 1 " << w << endl; cin >> ans2; rep(i, h) { rep(j, w) { if(i * i + j * j == ans1 && i * i + (w-1-j) * (w-1-j) == ans2) { cout << "! " << i+1 << " " << j+1 << endl; return 0; } } } }