#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint32_t i, j; vector is_prime(10'000'001, true); is_prime[0] = is_prime[1] = false; for (i = 2; i <= 10'000'000; ++i) if (is_prime[i] && i <= 10'000) for (j = i * i; j <= 10'000'000; j += i) is_prime[j] = false; uint64_t N; uint16_t prime_factors_count = 0; cin >> N; for (i = 2; static_cast(i) * i <= N; ++i) { if (is_prime[i]) while (N % i == 0) ++prime_factors_count, N /= i; } if (N > 10'000'000 || is_prime[N]) ++prime_factors_count; if (prime_factors_count >= 3) cout << "YES\n"; else cout << "NO\n"; return 0; }