#include using namespace std; int main() { int h = 0,w = 0; cin >> h >> w; if (h == 1 && w == 1) { cout << "! 1 1" << endl; } else if (h == 1) { cout << "? 1 1" << endl; int temp = 0; cin >> temp; cout << "! 1 " << 1 + round(sqrt(temp)) << endl; } else if (w == 1) { cout << "? 1 1" << endl; int temp = 0; cin >> temp; cout << "! " << 1 + round(sqrt(temp)) << " 1" << endl; } else { cout << "? 1 1" << endl; cout << "? 1 2" << endl; int temp1 = 0,temp2 = 0; cin >> temp1 >> temp2; for (int i = 1;i <= h;i++) { for (int j = 1;j <= w;j++) { if ((i - 1) * (i - 1) + (j - 1) * (j - 1) == temp1) { if ((i - 1) * (i - 1) + (j - 2) * (j - 2) == temp2) { cout << "! " << i << " " << j << endl; return 0; } } } } } }