N = input() cnt = 0 is_prime = [True] * (10**7 + 10) prime = [] def sieve(N): is_prime[0] = False is_prime[1] = False for i in range(2, N): if (is_prime[i]): prime.append(i) for j in range(i*i, N, i): is_prime[j] = False sieve(10 ** 7) for x in prime: if (x * x > N): break while (N % x == 0): N /= x cnt += 1 if (N != 1): cnt += 1 if (cnt == 0 or cnt == 1): print "NO" else: print "YES"