def factorize(n): p = 2 while p * p <= n: while n % p == 0: yield p n //= p p += 1 if n > 1: yield n def f(n: int) -> bool: if n == 1: return False ps = list(factorize(n)) return len(ps) > 2 N = int(input()) ans = f(N) if ans: print('YES') else: print('NO')