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