#include <bits/stdc++.h>
#include <iomanip>
#define FAST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define DECIMAL(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
#define mod 1000000007
#define mp make_pair
#define pb push_back
#define fi first 
#define se second
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))  
#define REVERSE(v) reverse(ALL(v))
#define endl "\n"
#define maxc(v) max_element(all(v))
#define minc(v) min_element(all(v))
#define GCD(m,n) __gcd(m,n)
#define debug cerr<<"bhau"<<endl
#define debugv(x) cerr<<x<<endl
#define inputarr(a,n) for(int i=0;i<n;++i) cin>>a[i]
#define printarr(a,n) for(int i=0;i<n;++i) cout<<a[i]<<" "
#define initarr(a,n,x) for (int i=0;i<n;++i) a[i]=x
#define ll  long long
#define ld long double 
#define pii pair<int, int> 
#define pll pair<ll, ll>  
#define vi vector<int>  
#define vvi vector<vi > 
#define vii vector<pii >
using namespace std;
bool prime[1000000]; 
//(prime, true, sizeof(prime)); 
void sieve() 
{ 
    // Create a boolean array "prime[0..n]" and initialize 
    // all entries it as true. A value in prime[i] will 
    // finally be false if i is Not a prime, else true. 
  
  memset(prime, true, sizeof(prime));
    for (int p=2; p*p<=1000000; p++) 
    { 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=1000000; i += p) 
                prime[i] = false; 
        } 
    } 
}
int main()
{
   sieve();
   ll x;
   cin>>x;
   vector<pair<ll,ll>> v;
   v.pb(mp(1,x));
   for(ll i=2;i<=sqrt(x);i++)
   {
       if(x%i==0)
       {
           if(GCD(i,x/i)==1)
           v.pb(mp(i,x/i));
       }
   }
   ll ans=INT_MAX;
   ll index1;
   ll index2;
   for(int i=0;i<v.size();i++)
   {
       if(v[i].se<ans)
       {
           index1=v[i].fi;
           index2=v[i].se;
       }
   }
   cout<<index1<<" "<<index2<<endl;
}