#include <bits/stdc++.h>

using namespace std;

#define oo 1000000005
#define N 100005
#define rep(i,s,e) for(int i = s; i < e; i++)
#define lop(i,s,e) for(int i = s; i != e; i++)
#define FOR(it,c) for(__typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define SZ(x) ((int)(x).size())
#define X first
#define Y second

typedef pair<long long,long long> II;
typedef pair<II,int> D;
typedef long long LL;

vector<int> V;
map<int,int> M;
set<int> S;
queue<int> Q;
stack<int> ST;


 LL LCM(LL a, LL b){
    return (a*b)/__gcd(a, b);
 }

II minPair(LL lcm){

    II ans = make_pair(oo,oo);
    for (LL i = 1; i * i <= lcm; i++) {
        if (lcm % i == 0) {
            LL first = i;
            LL second = lcm / i;
           // cout<<"(first, second) = "<< first <<" , "<<second <<endl;
            if ( LCM(first,second) == lcm ) {
                if( max(ans.X,ans.Y) > max(first,second) )
                    ans = make_pair(first,second);
                //cout << first << " " << second <<endl;
            }
        }
    }
    return ans;
}

int main(){

LL n;
cin>>n;
II ans =  minPair(n);
cout<<ans.X<<" "<<ans.Y<<endl;
    return 0;
}
