import sys ##入力 N = int(input()) ##質問 def quenstion(K): print("? {}".format(K)) sys.stdout.flush() return int(input()) ##回答 def answer(L,R): print("! {} {}".format(L,R)) sys.stdout.flush() exit() a = quenstion(1) n1 = quenstion(N-1) if 2*a-1 == 2*n1-N+1: answer(2,N-1) l = 0 r = N-1 while r > l + 1: m = (r+l)//2 r = quenstion(m) if m-r == 0: c = m L,R = 1,c if N-c > c: L,R = c,N answer(L,R) else: r = m