from math import sqrt N = int(input()) prime_checker = [1]*10000001 primes = set([]) for i in range(2, int(sqrt(N)) + 1): if prime_checker[i] == 1: primes.add(i) for j in range(i*2, int(sqrt(N)) + 1, i): prime_checker[j] = 0 cnt = 0 for i in primes: if N == 1: break while N % i == 0: N //= i cnt += 1 if cnt >= 3: break if N != 1: cnt += 1 if cnt >= 3: print("YES") else: print("NO")