#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define f first
#define s second
using namespace std;
int maxval(ll a,ll b)
{
	if(a>b)
	return a;
	else
	return b;
}
int main()
{
	ll x;
	cin>>x;
	vector <pair <ll,ll> > v;
	if(x==1)
	cout<<1<<" "<<1<<endl;
	else
	{
	for(ll i=1;i<=sqrt(x);i++)
	{
		if(x%i==0)
		{
			ll k=__gcd(i,x/i);
			ll lc=i*(x/i)/k;
			if(lc==x)
			v.pb(mp(i,x/i));
		}	
	}
//	for(ll i=0;i<v.size();i++)
//	cout<<v[i].f<<" "<<v[i].s<<"  ";
//	cout<<endl;
	ll a=v[0].f;
	ll b=v[0].s;
	ll m=maxval(a,b);
	for(ll i=0;i<v.size();i++)
	{
		ll e=v[i].f;
		ll t=v[i].s;
		ll ma=maxval(e,t);
		if(m>ma)
		{
			a=v[i].f;
			b=v[i].s;
		}
	}
	cout<<a<<" "<<b<<endl;
}
	return 0;
}
