M=N=input();c=0;i=2 while i*i<=M: while N%i==0:c+=1;N/=i i+=1 print ["YES","NO"][c+(N!=1)<3]