def calc_dist(base_row, base_col, se_row, se_col): # 1-indexで、(se_row, se_col)は(base_row, base_col)からどれだけ離れているか?ユークリッド距離の2乗。 return (base_row - se_row)**2 + (base_col - se_col)**2 H, W = map(int, input().split()) if H == 1 and W == 1: print("! 1 1") exit() ###################################################### print("? 1 1") d1 = int(input()) # 左上からの距離(の2乗) ans_candidate = 0 # 答えの候補になるマスの個数 for row in range(1, H + 1): for col in range(1, W + 1): if calc_dist(1, 1, row, col) == d1: ans_candidate += 1 if ans_candidate == 1: for row in range(1, H + 1): for col in range(1, W + 1): if calc_dist(1, 1, row, col) == d1: print(f"! {row} {col}") exit() ###################################################### print(f"? {1} {W}") d2 = int(input()) # 右上からの距離(の2乗) ans_candidate = 0 # 答えの候補になるマスの個数 for row in range(1, H + 1): for col in range(1, W + 1): if calc_dist(1, 1, row, col) == d1 and calc_dist(1, W, row, col) == d2: ans_candidate += 1 if ans_candidate == 1: for row in range(1, H + 1): for col in range(1, W + 1): if calc_dist(1, 1, row, col) == d1 and calc_dist(1, W, row, col) == d2: print(f"! {row} {col}") exit()