N = int(input()) left = 1 right = N for q in range(10): if right - left == 1: print("?", 1) x = int(input()) continue mid = (left + right) >> 1 print("?", mid) x = int(input()) if x >= mid: left = mid else: right = mid print("Yes", left, right)