def query(n): print("?", n, flush=True) return int(input()) N = int(input()) ans = [-1] * (N + 1) ans[-1] = N - 1 l, r = 0, N for i in range(10): mid = (l + r) // 2 ans[mid] = query(mid) if ans[r] - ans[mid] == r - mid: r = mid else: l = mid for i in range(N): if ans[i] == ans[i + 1] and ans[i] != -1: print("Yes", i, i+1) exit()