import math n = int(input()) def cal(x): x *= 2 a = int(math.sqrt(x)) b = a + 1 if x == a * b: print('YES' , '\n' , a, sep='') else: print('NO') cal(n)