#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll x,a=1e18,b;
int main(){
	cin>>x;
	for(ll i=1;i<=sqrt(x);i++){
		ll rem=x%i;
		if(rem==0){
			ll div=x/i,an=i,d=__gcd(div,an);
			if(max(div*d,an)>max(an*d,div))an*=d;
			else div*=d;
			if(max(a,b)>max(div,an))a=div,b=an;
		}
	}
	cout<<a<<" "<<b;
    return 0;
}
