n = int(input()) def question(i): print("?", i) ans = int(input()) return ans def answer(i, j): print("Yes", i, j) l = 1 r = n minli = [-1 for i in range(n+1)] maxli = [-1 for i in range(n+1)] minli[1] = 1 maxli[1] = n-1 minli[n] = 1 maxli[n] = n-1 while abs(r-l) > 1: mid = (r+l)//2 ans = question(mid) minli[mid] = ans maxli[mid] = ans maxli[l] = min(maxli[l], ans) minli[r] = max(minli[r], ans) reslocl = mid-l-1 reslocr = r-mid-1 resvall = ans - minli[l] resvalr = maxli[r] - ans if resvall <= reslocl: r = mid else: l = mid answer(l,r)