from os import cpu_count import sys,random,bisect from collections import deque,defaultdict from heapq import heapify,heappop,heappush from itertools import permutations from math import log,gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) def query(k): print("? {}".format(k)) sys.stdout.flush() res = int(input()) assert res!=-1 return res def answer(l,r): print("! {} {}".format(l,r)) sys.stdout.flush() N = int(input()) if query(1)==1: first = 1 else: first = 0 if query(N-1)==N//2-1: end = 1 else: end = 0 if first!=end: exit(answer(2,N-1)) f_L = 2*first - 1 f_R = 2*(N//2 - end) - (N-1) L = 1 R = N while R-L > 1: mid = (L+R)//2 check = 2 * query(mid) - mid if f_L * check >= 0: L = mid else: R = mid if N//2 <= L: answer(1,L) else: answer(L+1,N)