import math def check(x): return x * (x + 1) // 2 n = int(input()) ng = 0 ok = pow(10, 18) * 2 while ng + 1 != ok: mid = (ng + ok) // 2 if n <= check(mid): ok = mid else: ng = mid if check(ok) == n: print("Yes") print(ok) else: print("No")