N=int(input()) cnt=0 for i in range(2,int(N**0.5)+1): while N%i==0: cnt+=1 N//=i if cnt==3: break if N!=1: cnt+=1 print("YES" if cnt>2 else "NO")