#include<bits/stdc++.h>
#define REP(i,n) for (int i = 1; i <= n; i++)
#define mod 1000000007 
#define pb push_back 
#define lli long long int 
#define ff first 
#define ss second 
#define ii pair <int,int>
#define vi vector <int>
#define vii vector <ii>
#define lli long long int
#define INF 1000000000
#define endl '\n'
const double PI = 3.141592653589793238460 ; 
typedef std::complex <double> Complex ; 
typedef std::valarray <Complex> CArray ;
 
using namespace std;
int main(){
   int n ;
   cin >> n ;
   int a=1,b=1 ;
   for(int i=sqrt(n);i>=1;i--){
       if(i*i == n)
        continue ;
        if(i==1){
            a = 1 ;
            b = n ;
            break ;
        }
       if(n%i==0 && ((n/i)%i)!=0){
           a = i ;
           b = (n/i) ;
           if(__gcd(a,b) == 1) 
              break ;
       }
   }
 cout << a << " " << b << endl ;
  
  return 0 ;
}