A = int(input()) N = 2 * A import sys i = 2 while i * i <= N: if N % i == 0: j = N // i if i % 2 != j % 2: print('YES') exit() i += 1 print('NO')