#include <bits/stdc++.h>

using namespace std;
typedef long long ll ;
#define pb push_back 
const int maxn = 1e5 ; 
void tr(){
	cout << "NO\n";
}
void fa(){
	cout << "YES\n";
}
ll lcm(int a , int b){
	return b/__gcd(a,b) * a ; 
}
int main()
{
	ll n ;
	cin >> n ;
	ll a =1  , b=1 ;
	for(int i = 1 ;i <= sqrt(n) ; i++){
		if(n%i==0){
			if(lcm(i,n/i) == n){
				a=i;
				b=n/i ;
			}
		}
	}
	cout << a << " " << b ;
} 
