def func(N): li=[] num=N for i in range(2,int(N**(1/2))+2): if num%i==0: si=0 while num%i==0: num=num//i si+=1 li.append([i,si]) if num!=1: li.append([num,1]) return li A=int(input()) B=0 B+=A while B%2==0: B//=2 if B==1: print("NO") else: data=func(B) C=data[0][0] if A//C-(C-1)//2>=0: print("YES") else: print("NO")