N=int(input()) cnt=0 for p in range(2,N): if p**2>N: print("NO") exit() while N%p==0: N//=p cnt+=1 if cnt==2: print("YES") exit() print("NO")