def divisor(n): cd = [] i = 1 while i*i <= n: if n%i==0: cd.append(i) if i != n//i: cd.append(n//i) i += 1 return cd A = int(input()) for x in divisor(2*A): if x<3: continue y = A//x if (x-y+1)%2==0: print('YES') break else: print('NO')