N=int(input()) cnt=0 for p in range(2,int(N**.5)+1): while N%p==0: N//=p cnt+=1 if N==1: break if N!=1: cnt+=1 if cnt>=3: ans='YES' else: ans='NO' print(ans)