#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define F           first
#define S           second
#define mod         1000000007
#define lbnd(v,val) lower_bound(v.begin(),v.end(),val)
#define ubnd(v,val) upper_bound(v.begin(),v.end(),val)
#define bs(v,val)   binary_search(v.begin(),v.end(),val)
#define mp          make_pair
#define f(i,x,n)    for(int i=x;i<n;i++)
#define isup		isupper
#define islow 		islower
#define max3(a,b,c)	max(a,max(b,c))
using namespace std;

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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    #ifndef ONLINE_JUDGE
	freopen("in.txt","r",stdin);
	freopen("out.txt","w",stdout);
    #endif

    
    	ll n;
    	cin>>n;
    	ll ans=0;
    	for(ll x=1;(x*x)<=n;x++){
    		if(n%x==0 && lcm(x,(n/x))){
    			ans = x;
    		}
    	}
    	cout<<ans<<" "<<(n/ans)<<endl;
    return 0;
}
