#include<iostream>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)

int in;
int Q(int y, int x){
    cout<<"? "<<y<<" "<<x<<endl;
    cin>>in;
    return in;
}
void A(int y, int x){
    cout<<"! "<<y<<" "<<x<<endl;
    exit(0);
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int H,W;
    cin>>H>>W;
    
    if(H==1&&W==1){
        A(1,1);
    }

    int a=Q(1,1);
    int c=0,y,x;
    for(int i=H+1;--i;)for(int j=W+1;--j;){
        if((i-1)*(i-1)+(j-1)*(j-1)==a){
            y=i;
            x=j;
            c++;
        }
    }
    if(c==1){
        A(y,x);
    }
    int b=Q(1,W);
    for(int i=H+1;--i;)for(int j=W+1;--j;){
        if((i-1)*(i-1)+(j-1)*(j-1)==a && (i-1)*(i-1)+(j-W)*(j-W)==b){
            A(i,j);
        }
    }
    
}