def main(): # 入力 H, W = map(int, input().split()) # 計算・出力 def ask(x, y): print(f'? {x+1} {y+1}', flush=True) res = int(input()) if res == -1: exit() return res def ans(x, y): print(f'! {x+1} {y+1}', flush=True) exit() def dist(x1, y1, x2, y2): return (x1 - x2) ** 2 + (y1 - y2) ** 2 if H == 1 and W == 1: ans(0, 0) d1 = ask(0, 0) kouho = [] for x in range(H): for y in range(W): if dist(0, 0, x, y) == d1: kouho.append((x, y)) if len(kouho) == 1: ans(*kouho[0]) d2 = ask(0, W-1) for x, y in kouho: if dist(0, W-1, x, y) == d2: ans(x, y) if __name__ == "__main__": main()