#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin >> n; ll m = n; ll a = 1, b = 1; for (ll i = 2; i * i <= n; i++) { int cnt = 0; while (m % i == 0) { m /= i; ++cnt; if (cnt % 2 == 0) a *= i; } if (cnt & 1) b *= i; } b *= m; cout << a << " " << b << newl; return 0; }