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