#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const ll mod = 1000000007;
ll res=INT_MAX;
void print(ll n) 
{ 
    ll r,l;
    for (ll i=1; i*i<=n; i++) 
    { 
        if (n%i==0) 
        { 
           if(__gcd(i,n/i)==1){
                 if( max(i,n/i) < res) {
                     res = max(i,n/i); 
                     r= i;
                     l = n/i; 
                 }
           }
        } 
    }

   cout<<r<<" "<<l;
   
}
int main()
{
    FASTINOUT;
    ll x;
    cin>>x;
    print(x);
    return 0;
}