n = int(input()) l = 0 r = n + 1 l_ = 0 r_ = n while r - l > 1: mid = (l + r) // 2 print("? {}".format(mid), flush=True) x = int(input()) if mid - l <= x - l_: l = mid l_ = x else: r = mid r_ = x print("Yes {} {}".format(l, r), flush=True)