#include using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif template > constexpr T power(T a, long long n, Op op = Op(), T e = {1}) { assert(n >= 0); while (n) { if (n & 1) e = op(e, a); if (n >>= 1) a = op(a, a); } return e; } template map factorize(T n) { map res; for (T i = 2; i * i <= n; ++i) while (n % i == 0) ++res[i], n /= i; if (n != 1) ++res[n]; return res; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; int a = 1, b = 1; for (auto [p, e] : factorize(n)) { a *= power(p, e / 2); b *= power(p, e & 1); } cout << a << ' ' << b << '\n'; }