#include <bits/stdc++.h> #define FASTIO using namespace std; using ll = long long; using Vi = vector<int>; using Vl = vector<ll>; using Pii = pair<int, int>; using Pll = pair<ll, ll>; constexpr int I_INF = numeric_limits<int>::max(); constexpr ll L_INF = numeric_limits<ll>::max(); //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ll power(ll a, ll n) { ll res = 1; for (; n > 0; n >>= 1) { if (n & 1) res *= a; a *= a; } return res; } void solve() { ll N; cin >> N; unordered_map<ll, ll> factors; for (ll i = 2; i * i <= N; i++) { while (N % i == 0) { ++factors[i]; N /= i; } } if (N > 1) ++factors[N]; ll a = 1, b = 1; for (const auto& [v, d] : factors) { if (d & 1) { b *= v; a *= power(v, d / 2); } else { a *= power(v, d / 2); } } cout << a << " " << b << "\n"; } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% int main() { #ifdef FASTIO cin.tie(0), cout.tie(0); ios::sync_with_stdio(false); #endif #ifdef FILEINPUT ifstream ifs("./in_out/input.txt"); cin.rdbuf(ifs.rdbuf()); #endif #ifdef FILEOUTPUT ofstream ofs("./in_out/output.txt"); cout.rdbuf(ofs.rdbuf()); #endif solve(); cout << flush; return 0; }