#include #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; using ll = long long; using P = pair; int main() { int n; cin >> n; int ans = 0; int res = 0; for(int i = 1; i*i <= n; i++){ if(n%(i*i) == 0){ ans = n/(i*i); res = i; } } cout << res << " " << ans << endl; }