N=int(input()) b="a" for i in range(N): if i*i==i: continue if N%i==N%N: b="b" if b=="a" and N*N!=N: print("YES") else: print("NO")