#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
const ll INF = 100000000000ll;
const int N = 200005;
const int prime = 31;
const ll mod = 1000000007;
const ld eps = 1e-5;
mt19937_64 strong_random(
    chrono::system_clock::now().time_since_epoch().count());
ll n;
void input() { scanf("%lld", &n); }
void solve() {
  vector<ll> divisors;
  ll nval = n;
  ll dv = 2;
  while (dv * dv <= n) {
    if (n % dv == 0) {
      int cc = 0;
      divisors.push_back(1);
      while (n % dv == 0) {
        n /= dv;
        divisors.back() *= dv;
      }
    } else {
      dv++;
    }
  }
  if (n != 1) {
    divisors.push_back(n);
  }
  int bitcnt = (int)(divisors).size();
  pll ans = {nval, 1};
  for (int i = 0; i < (1 << bitcnt); i++) {
    ll a = 1, b = 1;
    for (int j = 0; j < bitcnt; j++) {
      if ((1 << j) & i) {
        a *= divisors[j];
      } else {
        b *= divisors[j];
      }
    }
    if (a < b) swap(a, b);
    ans = min(ans, {a, b});
  }
  cout << ans.second << " " << ans.first << endl;
}
void precalc() {}
int main() {
  precalc();
  int testcases = 1;
  for (int testId = 1; testId <= testcases; testId++) {
    input();
    solve();
  }
  return 0;
}
