H, W = map(int, input().split())

if (H, W) == (1,1):
    print(f'! {1} {1}', flush=True)
    exit()

print(f'? {1} {1}', flush=True)

d = int(input())
possible = []
for i in range(H):
    for j in range(W):
        if i**2 + j**2 == d:
            possible.append((i, j))

if len(possible) == 1:
    ansi, ansj = possible[0]
    print(f'! {ansi+1} {ansj+1}', flush=True)
    exit()

if H < W:
    print(f'? {1} {W}', flush=True)
    d = int(input())
    possible2 = []
    for i, j in possible:
        if i**2 + j**2 == d:
            possible2.append((i, j))
    ansi, ansj = possible[0]
    print(f'! {ansi+1} {ansj+1}', flush=True)
    exit()

else:
    print(f'? {H} {1}', flush=True)
    d = int(input())
    possible2 = []
    for i, j in possible:
        if i**2 + j**2 == d:
            possible2.append((i, j))
    ansi, ansj = possible[0]
    print(f'! {ansi+1} {ansj+1}', flush=True)
    exit()