#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pcase cout<<"Case "<<++cs<<":"
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define mp make_pair
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl

ll lcm(ll a, ll b){
    return (a*b) / __gcd(a,b);
}

int main()
{
    ll i = 0, j = 0, cs = 0, in;
    ll x; cin>>x;
    vll v;
    for(i = 1; i * i <= x; i++){
        if(x % i == 0){
            v.pb(i);
            if(i != x/i) v.pb(x / i);
        }
    }
    watch(v.size());
    ll ansa = 1LL << 50, ansb = 1LL << 50;
    for(i = 0; i < v.size(); i++){
        ll a = v[i];
        for(j = i; j < v.size(); j++){
            ll b = v[j];
            if(b < x/a) continue;
            if(lcm(a,b) == x){
                if(max(a,b) < max(ansa,ansb)){
                    ansa = a;
                    ansb = b;
                }
            }
        }
    }
    cout << ansa << " " << ansb << endl;
    return 0;
}
