def question(K): print("?",K,flush=True) S=int(input()) T[K]=S-(K-S) def answer(L,R): print("!",L,R,flush=True) exit() #================================================== N=int(input()) T=[None]*(N+1) question(1); question(N-1) if T[1]==T[N-1]: answer(2,N-1) L,R=1,N-1 while True: C=(L+R)//2 question(C) if T[C]==0: break elif T[C]*T[N-1]>0: R=C else: L=C+1 if N//2<=C: answer(1,C) else: answer(C+1,N)