#include #include #include #include namespace Wheel { static constexpr uint64_t miniprimes[] = {2, 3, 5, 7, 11}; static std::vector diff; struct Initializer { Initializer() { uint64_t prev = 13; for(uint64_t i = 13 + 1; i <= 13 + 2 * 3 * 5 * 7 * 11; ++i) { auto checker = [](uint64_t i){ for(uint64_t p : miniprimes) { if( i % p == 0 ) return true; } return false; }; if( checker(i) ) continue; diff.push_back(i - prev); prev = i; } } } initializer; static bool isprime(uint64_t x) { for(uint64_t p : miniprimes) { if( p == x ) return true; if( x % p == 0 ) return false; } assert( x >= 13 ); for(uint64_t p = 13;;) { for(std::size_t k = 0; k < diff.size(); ++k) { if( x == p ) return true; if( x % p == 0 ) return false; p += diff[k]; if( p >= (1ULL << 32) ) return true; if( p * p > x ) return true; } } return true; } static std::vector< std::tuple > primeFactors(uint64_t x) { std::vector< std::tuple > res; for(uint64_t p : miniprimes) { int count = 0; while( x % p == 0 ) { x /= p; count += 1; } if( count != 0 ) { res.push_back(std::make_tuple(p, count)); } } for(uint64_t p = 13;;) { for(std::size_t k = 0; k < diff.size(); ++k) { int count = 0; while( x % p == 0 ) { x /= p; count += 1; } if( count != 0 ) { res.push_back(std::make_tuple(p, count)); } if( x == 1 ) goto label_1; p += diff[k]; if( p >= (1ULL << 32) ) goto label_1; if( p * p > x ) goto label_1; } } label_1:; if( x != 1 ) { res.push_back(std::make_tuple(x, 1)); } return res; } }; #include int main() { uint64_t n; scanf("%lu", &n); auto res = Wheel::primeFactors(n); int count = 0; for(auto x : res) { //printf("%lu, %d\n", std::get<0>(x), std::get<1>(x)); count += std::get<1>(x); } puts(count >= 3 ? "YES" : "NO"); return 0; }