def solve(): import sys input = sys.stdin.read data = input().strip().split() N = int(data[0]) count_pigeons = {} for i in range(1, N + 1): print(f"? {i}") sys.stdout.flush() number_of_pigeons = int(input()) if number_of_pigeons in count_pigeons: count_pigeons[number_of_pigeons].append(i) else: count_pigeons[number_of_pigeons] = [i] for pigeons, holes in count_pigeons.items(): if len(holes) > 1: print(f"Yes {holes[0]} {holes[1]}") return print("No") solve()