#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	ll x,l,a,b;
	cin>>x;
	ll m=INT_MAX;
	for(ll i=1;i*i<=x;i++){
		a=i;
		if(x%i==0){
			b=x/i;
			if(__gcd(a,b)==1){
		m=min(m,b);
		
			}
		}
		
	}
	cout<<m<<" "<<x/m<<endl;
}
