n=int(input()) l=list(range(2,int(n**.5)))+[n] while n in l: l=[x for x in l if x%l[0]>0] print("NO" if n in l else "YES")