#include<bits/stdc++.h>
#define ll long long int
using namespace std;
ll lcm(ll a, ll b){
    return (a*b)/__gcd(a,b);
}
int main(){
    ll n;
    cin>>n;
    ll ans;
    for(ll i = 1; i*i < n; i++){
        if(n%i==0 && lcm(i, n/i)==n){
            ans = i;
        }
    }
    cout<<ans<<" "<<n/ans<<'\n';
    return 0;
}