n=m=int(input()) c,i=0,2 while n>=i*i: while m%i<1: m/=i; c+=1 i+=1 if c>2: break c+=m>1 print(["YES","NO"][c<3])