
// C++ implementation of the approach 
#include <bits/stdc++.h> 
using namespace std; 
  
// Function to return the LCM of a and b 
int lcm(int a, int b) 
{ 
    return (a / __gcd(a, b) * b); 
} 
  
// Function to return the minimized value 
void getMinValue(int c) 
{ 
    int ans = INT_MAX;
    int a,b; 
  
    // To find the factors 
    for (int i = 1; i <= sqrt(c); i++) { 
   
        if (c % i == 0 && lcm(i, c / i) == c) {
            int prev=ans; 
            ans = min(ans, max(i, c / i));
            if(prev!=ans)
            {
                a=min(i,c/i);
                b=max(i,c/i);
            }
        } 
    } 
    cout<<a<<" "<<b<<endl; 
} 
  
// Driver code 
int main() 
{ 
    int c;
    cin>>c;
    getMinValue(c);
    return 0; 
}