#include using namespace std; int main(){ int n; cin >> n; map mp; while (n > 1){ for (int i = 2; i <= n; i++){ if (n % i == 0){ mp[i]++; n /= i; break; } } } int a = 1, b = 1; for (auto [k, v] : mp){ for (int i = 0; i < v / 2; i++){ a *= k; } if (v % 2 == 1){ b *= k; } } cout << a << ' ' << b << endl; }