#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<long long> VL; typedef vector<VL> VVL; typedef long long LL; #define all(a) (a).begin(), (a).end() #define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl #define ALL(a) (a).begin(),(a).end() #define pb push_back int main() { int h,w,d,dd;cin>>h>>w; if(h==1){ cout<<"? "<<1<<' '<<1<<endl; cin>>d; for(int j=1;j<=w;j++){ if(d==(j-1)*(j-1)){ cout<<"! "<<1<<' '<<j<<endl;return 0; } } } if(w==1){ cout<<"? "<<1<<' '<<1<<endl; cin>>d; for(int j=1;j<=h;j++){ if(d==(j-1)*(j-1)){ cout<<"! "<<j<<' '<<1<<endl;return 0; } } } cout<<"? "<<1<<' '<<1<<endl; cin>>d; cout<<"? "<<1<<' '<<w<<endl; cin>>dd; for(int i=1;i<=h;i++)for(int j=1;j<=w;j++){ if((i-1)*(i-1)+(j-1)*(j-1)==d&&(i-1)*(i-1)+(j-w)*(j-w)==dd){ cout<<"! "<<i<<' '<<j<<endl; return 0; } } }