#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int lcm(int a, int b)  
 {  
    return (a*b)/__gcd(a, b);  
 } 
int main()
{int n;cin>>n;

ll a,b;
for(ll i=sqrt(n);i>=1;i--)
{
	if(n%i==0&&lcm(i,n/i)==n){a=i;break;}
}
cout<<a<<" "<<n/a<<endl;
}