import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd n = int(input()) last = [0,n] l,r = 1, n+1 cnt = [i for i in range(n)] for i in range(10): m = (l+r)//2 print("?", m, flush = True) t = int(input()) if t < m: l, r = l,m else: l, r = m,r print('Yes', l, r, flush = True)