n=input() c=0 while n&1==0: n>>=1 c+=1 for i in xrange(3,n,2): while n%i==0: n/=i c+=1 if c>2: break print["NO","YES"][c>2]