N = int(input()) import sys q = (N + 1) // 2 for t in range(q,q + 31): if 2 * t - bin(t).count('1') == N: print('YES') exit() print('NO')