N=int(input()) b="b" if N==ord("b")%ord("a"): b="a" for i in range(ord("c")%ord("a"),N): if N%i==N%N: b="a" if b=="b": print("YES") else: print("NO")