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