#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int H,W; cin >> H >> W; auto ques = [&](int x,int y) -> int { cout << "? " << x+1 << " " << y+1 << endl; int ret; cin >> ret; return ret; }; auto ans = [&](int x,int y) -> void { cout << "! " << x+1 << " " << y+1 << endl; }; int now = ques(0,0); if(now == -1) return 0; vector> kouho; for(int i=0; i kind; for(auto &[x,y] : kouho) kind.insert((abs(x-i)*abs(x-i)+abs(y-k)*abs(y-k))); if(kind.size() == kouho.size()){ now = ques(i,k); if(now == -1) return 0; for(auto &[x,y] : kouho){ int dist = abs(x-i)*abs(x-i)+abs(y-k)*abs(y-k); if(dist == now){ans(x,y); return 0;} } } } }