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

#define For(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) For(i, 0, n)
#define rFor(i, a, b) for(int i = (a); i >= (b); i--)
#define ALL(v) (v).begin(), (v).end()
#define rALL(v) (v).rbegin(), (v).rend()

using lint = long long;
using ld = long double;

int INF = 2000000000;
lint LINF = 1000000000000000000;

int dist(int i, int j, int ii, int jj) {
    int dii = abs(i - ii);
    int djj = abs(j - jj);
    return dii * dii + djj * djj;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int h, w;
    cin >> h >> w;
    auto ask = [](int i, int j) -> int {
        cout << "? " << i << " " << j << "\n";
        cout.flush();
        int d;
        cin >> d;
        return d;
    };
    int d = ask(1, 1);
    set<pair<int, int>> s;
    For(i, 1, h + 1) {
        For(j, 1, w + 1) {
            if (dist(i, j, 1, 1) == d) {
                s.insert({i, j});
            }
        }
    }
    while (s.size() > 1) {
        auto it = s.begin();
        auto [i, j] = *it;
        int d = ask(i, j);
        if (d == 0) {
            cout << "! " << i << " " << j << "\n";
            cout.flush();
            return 0;
        }
        while (it != s.end()) {
            auto [ii, jj] = *it;
            if (dist(i, j, ii, jj) != d) {
                it = s.erase(it);
            }
        }
    }
    auto [i, j] = *s.begin();
    cout << "! " << i << " " << j << "\n";
    cout.flush();
    return 0;
}