n = int(input()) for i in range(31)[::-1]: v = 2**i - 1 if n >= v: n -= v print("NO" if n else "YES")