#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll x, i , j, f=0 , ans = 10e9, fe, se;
  cin >> x;
  

  if(x == 1) {
    cout << 1 << " " << 1 << endl;
    return 0;
  }
    if(x == 2) {
    cout << 1 << " " << 2<< endl;
    return 0;
  }

    if(x == 3) {
    cout << 1 << " " << 3 << endl;
    return 0;
  }
  for(i=2;i<= sqrt(x);i++){
    if(x%i == 0) {
      f = 1;
      break;
    }
  }
  if(f == 0) cout << 1 << " " << x << endl;
  else {
    for(i=sqrt(x);i>=1;i--){
      if(x%i == 0 && __gcd(i, x/i) == 1){
        int mn = abs(x/i - i);
        if(ans > mn){
           fe = i;
           se = x/i;
           ans = mn;
        }
       
        
      }
    }
  }
  cout << fe << " " << se << endl;
 
  return 0;
}