#coding: utf-8 ##yuki_36 import math n=int(raw_input()) temp=0 for i in xrange(2,int(math.sqrt(n))+1): while n%i==0: temp+=1 n/=i if n>1: temp+=1 if temp>=3: print "YES" else: print "NO"