#include namespace Wheel { static constexpr uint64_t miniprimes[] = {2, 3, 5, 7, 11, 13}; static std::vector diff; struct Initializer { Initializer() { uint64_t prev = 17; for(uint64_t i = 17 + 1; i <= 17 + 2 * 3 * 5 * 7 * 11 * 13; ++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 >= 17 ); for(uint64_t p = 17;;) { 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; } // x >= 2 static std::vector< std::tuple > primeFactors(uint64_t x) { assert( x != 0 and x != 1 ); 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 = 17;;) { 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; } }; int main() { uint64_t x; scanf("%lu", &x); if( x == 1 ) { printf("1 1\n"); return 0; } auto factors = Wheel::primeFactors(x); auto y = std::get<0>(factors[0]); printf("%lu %lu\n", y, x / y); return 0; }