N=int(input()) zero=False one=True two=sum([one,one]) if N==one: print('NO') exit() for i in range(two,N): if N%i==zero: print('NO') break else: print('YES')