/* In the name of Allah */
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
int main(){
	ll x;
	cin >> x;
	for(ll i = 1; i * i <= x; i++){
		if(__gcd(i, x / i) == 1 && (x / i) * i == x){
			cout << i << " " << x / i;
			return 0;
		}
	}
}
