def binary_search(target): left, right = 1, 2*10**9 while left <= right: mid = (left + right) // 2 guess = mid * (mid + 1) // 2 if guess == target: return mid elif guess < target: left = mid + 1 else: right = mid - 1 return -1 N = int(input()) ans = binary_search(N) if ans == -1: print('No') else: print('Yes') print(ans)