#include #include #include #include #include #include #include #include #include #include #include using ld = long double; using ll = long long int; using ul = unsigned long long int; namespace lamlib { /* constant */ constexpr double epsilon = std::numeric_limits::epsilon(); /* math */ template inline T abs(const T &a){ return (a>0) ? a : -a; } ul inline digit(const ul &num){ return static_cast
    (std::log10(num+epsilon))+1; } /* algorithm */ ul gcd(const ul &a,const ul &b) { return (!b) ? a : gcd(b,a%b); } // NOTE: a > b std::vector eratosthenes(const ul &n) { std::vector prime_candidate(n,true); prime_candidate[0] = prime_candidate[1] = false; const ul max_n = static_cast
      (std::sqrt(n)); for(ul i = 2;i <= max_n;++i) { if(!prime_candidate[i]) continue; for(ul j = 2;i*j < n;++j) { prime_candidate[i*j] = false; } } return prime_candidate; } /* string */ inline ul same_char_count(const std::string s,const char &ch){ return std::count(std::cbegin(s),std::cend(s),ch); } } // std::cout << std::fixed << std::setprecision(15) << std::endl; int main(int argc,char *argv[]) { ll n; std::cin >> n; auto prime = lamlib::eratosthenes(n); const ll loop = n+1; std::map mp; for(int i = 0;i < loop;++i) { if(prime[i]) { if(n%i == 0) { n /= i; ++mp[i]; --i; } } } ll ans_l = 1, ans_r = 1; for(auto itr = mp.begin();itr != mp.end();++itr) { ll count = itr->second; if(itr->second > 1) { ans_l *= std::pow(itr->first,count/2); count %= 2; } ans_r *= std::pow(itr->first,count); } std::cout << ans_l << " " << ans_r << std::endl; return 0; }