n=int(input()) def fact(n): b=2 fct=[] while b*b<=n: while n%b==0: n//=b fct.append(b) b=b+1 if n>1: fct.append(n) return fct if len(fact(n))>=3: print('YES') else: print('NO')