#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(a, b, c) for (int a = b; a < (int)c; ++a)

vector<int> xm = {-1, 1, 0, 0};
vector<int> ym = {0, 0, 1, -1};

const ll MOD = 998244353;

int power(int x, int y)
{
    return x * x + y * y;
}

int main()
{
    int h, w;
    cin >> h >> w;
    cout << "? 1 1" << endl;
    int dist;
    cin >> dist;
    if (dist == 0)
    {
        cout << "! 1 1" << endl;
        return 0;
    }
    int x = 0, y = 0;
    rep(i, 1, h + 1)
    {
        rep(j, 1, w + 1)
        {
            if (power(i - 1, j - 1) == dist)
            {
                x = i, y = j;
                break;
            }
        }
    }
    cout << "? " << x << " " << y << endl;
    int dist2;
    cin >> dist2;
    if (dist2 == 0)
    {
        cout << "! " << x << " " << y << endl;
    }
    else
    {
        cout << "! " << y << " " << x << endl;
    }
}