#include <bits/stdc++.h>
using namespace std;
using ll = long long;
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h, w, d;
    cin >> h >> w;
    cout << "? 1 1" << endl;
    cin >> d;
    vector<pair<int,int>> cand, cand2;
    for(int y = 1; y <= h; y++){
        for(int x = 1; x <= w; x++){
            if((y - 1) * (y - 1) + (x - 1) * (x - 1) == d){
                cand.emplace_back(y, x);
            }
        }
    }
    if(cand.size() == 1){
        auto [y, x] = cand[0];
        cout << "! " << y << ' ' << x << endl;
        return 0;
    }
    if(h != 1){
        cout << "? " << h << ' ' << 1 << endl;
        cin >> d;
        for(auto [y, x] : cand){
            if((y - h) * (y - h) + (x - 1) * (x - 1) == d){
                cand2.emplace_back(y, x);
            }
        }
    }else{
        cout << "? " << 1 << ' ' << w << endl;
        cin >> d;
        for(auto [y, x] : cand){
            if((y - 1) * (y - 1) + (x - w) * (x - w) == d){
                cand2.emplace_back(y, x);
            }
        }
    }
    swap(cand, cand2);
    if(cand.size() == 1){
        auto [y, x] = cand[0];
        cout << "! " << y << ' ' << x << endl;
        return 0;
    }
    cand2.clear();

    cout << "? " << 1 << ' ' << w << endl;
    cin >> d;
    for(auto [y, x] : cand){
        if((y - 1) * (y - 1) + (x - w) * (x - w) == d){
            cand2.emplace_back(y, x);
        }
    }
    swap(cand, cand2);
    if(cand.size() == 1){
        auto [y, x] = cand[0];
        cout << "! " << y << ' ' << x << endl;
        return 0;
    }
    assert(false);
}