import sys int1 = lambda x: int(x) - 1 # input = lambda: sys.stdin.buffer.readline() input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) i1 = lambda: int1(input()) mi = lambda: map(int, input().split()) mi1 = lambda: map(int1, input().split()) li = lambda: list(mi()) li1 = lambda: list(mi1()) lli = lambda n: [li() for _ in range(n)] INF = float("inf") mod = int(1e9 + 7) # mod = 998244353 def ask(k): print("?", k) sys.stdout.flush() return ii() n = ii() lim = 20 l, r = 1, n for _ in range(lim): m = (l + r) // 2 x = ask(m) if x * 2 == m: r = m break elif x * 2 < m: r = m elif x * 2 > m: l = m if n // 2 <= r: print("!", 1, r) else: print("!", r + 1, n)