#include<bits/stdc++.h>
using namespace std;

int question(int i,int j){
    printf("? %d %d\n",i,j);
    fflush(stdout);
    int d;
    scanf("%d",&d);
    return d;
}

void answer(int i,int j){
    printf("! %d %d\n",i,j);
    fflush(stdout);
}

int main(){
    int H,W; cin>>H>>W;
    if(H==1&&W==1){
        answer(1,1);
        return 0;
    }

    int d1=question(1,1);

    vector<pair<int,int>> D;

    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            int dist1=(i-1)*(i-1)+(j-1)*(j-1);
            if(dist1==d1){
                D.push_back({i,j});
            }
        }
    }

    if(D.size()==1){
        answer(D[0].first,D[0].second);
        return 0;
    }

    D.clear();

    int d2=question(H,W);

    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            int dist1=(i-1)*(i-1)+(j-1)*(j-1);
            int dist2=(i-H)*(i-H)+(j-W)*(j-W);
            if(dist1==d1 && dist2==d2){
                D.push_back({i,j});
            }
        }
    }

    if(D.size()==1){
        answer(D[0].first,D[0].second);
        return 0;
    }

    int d3=question(D[0].first,D[0].second);
    if(d3==-1)return 1;

    if(d3==0)answer(D[0].first,D[0].second);
    else answer(D[1].first,D[1].second);

    return 0;
}