#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define vi vector<int>
#define vb vector<bool>
#define pii pair<int,int>
#define mod 1000000007
#define ss second
#define ff first
#define vpii vector<pii>
#define vvi vector<vi>
#define pb push_back
void printDivisors(int n,vpii &v){
    for (int i=1; i<=sqrt(n); i++) 
    { 
        if (n%i == 0) 
        {
            if (n/i == i) 
                continue; 
                v.push_back({i,n/i});
        } 
    } 
} 
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n,i;
    cin>>n;
    vpii v;
    printDivisors(n,v);
    int mini=INT_MAX;
    pii p;
    if(n==1){
        cout<<1<<" "<<1<<endl;
        return 0;
    }
    for(i=0;i<v.size();i++){
        if(max(v[i].ff,v[i].ss)<mini && ((v[i].ff*v[i].ss)/__gcd(v[i].ff,v[i].ss))==n){
            mini = max(v[i].ff,v[i].ss);
            p = v[i];
        }
    }
    if(p.ff>p.ss)cout<<p.ss<<" "<<p.ff<<endl;
    else cout<<p.ff<<" "<<p.ss<<endl;
    return 0;
}