N = int(input()) l, r = 1, N al, ar = 1, N - 1 while l + 1 < r: m = (l + r) // 2 print('?', m) am = int(input()) if am - al < m - l: r = m else: l = m print("Yes", l - 1, r - 1)