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