n = int(input()) def question(i): print("?", i) ans = int(input()) return ans def answer(i, j): print("Yes", i, j) ok = 1 ng = n+1 for i in range(10): mid = (ok+ng)//2 ans = question(mid) if ans >= mid: ok = mid else: ng = mid answer(ok, ok+1)