n = int(input()) i = 2 count = 0 m = n while(i*i<=n): while(m%i==0): m /= i count += 1 i+=1 if(m>1): count += 1 if(count>2): print("YES") else: print("NO")