from math import sqrt def PrimeFactorization(N): ret = 0 for i in range(2,int(sqrt(N))+1): while N % i == 0: ret += 1 N //= i if N > 1: ret += 1 return ret N = int(input()) if PrimeFactorization(N) >= 3: print('YES') else: print('NO')