#include <bits/stdc++.h>
#define INF (int)1e9
#define endl "\n"
#define ll long long
#define ull unsigned long long

using namespace std;

int main()
{
    ll n;
    cin >> n;
    pair<ll, ll> ans = {INF, INF};

    for (ll i = 1; i <= sqrt(n); i++)
    {
        if (n % i != 0)
            continue;
        ll other = n / i;
        if (__gcd(i, n / i) == 1)
        {
            if (max(ans.first, ans.second) > max(i, other))
            {
                ans = {i, other};
            }
        }
    }

    cout << ans.first << " " << ans.second << endl;
}