#include<bits/stdc++.h>
#define arr(i,n) for(ll i=0;i<n;i++)
#define ARR(i,n) for(ll i=n-1;i>=0;i--)
#define rep(i,k,n) for(ll i=k;i<=n;i++)
#define REP(i,k,n) for(ll i=k;i>=n;i--)
#define float double
#define pb push_back
#define debug(x) cout<<(#x)<<" is "<<(x)<<endl
typedef long long ll;
using namespace std;
//nCr%p
ll ncrp(ll n,ll r,ll p)
{
    ll C[r+1];
    memset(C,0,sizeof(C));
    C[0]=1;
    rep(i,1,n)
    REP(j,min(i,r),1)
    C[j]=(C[j]+C[j-1])%p;
    return C[r];
}
//(x^y)%mm
ll mod_exp(ll x,ll y,ll mm)
{
    if(y==0)
        return(1);
    else if(y%2==0)
        return(mod_exp((x*x)%mm,y/2,mm));
    else
        return((x*mod_exp((x*x)%mm,(y-1)/2,mm))%mm);
}
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll x,mi=100;
    cin>>x;
    for(ll i=1;i*i<=x;i++)
    {
        if(x%i==0&&__gcd(i,x/i)==1)
            mi=min(mi,x/i);
    }
    cout<<x/mi<<" "<<mi;
    return 0;
}
