# your code goes here #prime N=int(input()) C=0 i=2 while C<2 and i*i<=N: if N%i==0: C+=1 N//=i while C<2 and N%i==0: C+=1 N//=i i+=1 if C==2 and N>1: print("YES") else: print("NO")