N=int(input()) for i in range(32): x=2**i if x==N or x-1==N: print("YES") exit() if x-1<=N=1: x=0 nec=now*2+1 for i in range(kai,ind+1): x+=nec nec*=2 #print(N,x,now) if x<=N: now=now*2+1 N-=now kai+=1 else: now=now*2 N-=now kai+=1 if N==0: print("YES") else: print("NO")