t, x0, y0, xt, yt = map(int, input().split()) l = -1 r = t while r - l > 1: c = (l + r) // 2 print('?', c) x, y = map(int, input().split()) if abs(x-x0) + abs(y-y0) <= abs(x-xt) + abs(y-yt): r = c else: l = c print('!', r)