#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&&__gcd(a,x/a)==1){
			cout<<a<<" "<<x/a<<endl;
			break;
		}
		
	}
	
}
