import sys def debug(*args): print(*args, file=sys.stderr) h, w = map(int, input().split()) # cdds = [(i, j) for i in range(1, h+1) for j in range(1, h+1)] # asks = [(1, h), (h, w), (1, 1)] # while len(cdds) > 1 and asks: # new_cdds = [] # ai, aj = asks.pop() # print('?', ai, aj) # d = int(input()) # if d == -1: # exit() # for i, j in cdds: # if (i-ai) ** 2 + (j-aj) ** 2 == d: # new_cdds.append((i, j)) # cdds, new_cdds = new_cdds, cdds # # debug('d', cdds) # if not cdds: # exit() # print('!', *cdds[0]) if h == 1 and w == 1: print('!', 1, 1) exit() print('?', 1, 1) d = int(input()) if d == -1: exit() cdds = [] for i in range(1, h+1): for j in range(1, w+1): if (i-1)**2 + (j-1)**2 == d: cdds.append((i, j)) # debug(cdds) if len(cdds) == 1: print('!', *cdds[0]) else: ai, aj = cdds[0] print('?', ai, aj) d = int(input()) if d == -1: exit() for i, j in cdds: if (i-ai)**2 + (j-aj)**2 == d: print('!', i, j) exit() print(-1) input() exit()