#include <bits/stdc++.h>
const long long base = 1000 * 1000 * 1000;
const double pi = 3.1415926535897932384626433832795;
using namespace std;
int32_t x;
std::vector<int_fast64_t> a;
std::vector<bool> use;
int32_t b, c;
void gen(int32_t ost) {
  if (ost == 0) {
    int32_t nowa = 1, nowb = 1;
    for (int32_t i = 0; i < a.size(); i++) {
      if (use[i] == 1) {
        nowa *= a[i];
      } else
        nowb *= a[i];
    }
    if (max(nowa, nowb) < max(b, c)) {
      b = nowa;
      c = nowb;
    }
    return;
  } else {
    use.push_back(0);
    gen(ost - 1);
    use.pop_back();
    use.push_back(1);
    gen(ost - 1);
    use.pop_back();
  }
}
int32_t main() {
  using std::cin;
  using std::cout;
  using std::max;
  using std::min;
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> x;
  b = x;
  c = 1;
  if (x == 1) {
    cout << 1 << ' ' << 1;
    return 0;
  }
  for (int32_t i = 2; i * i <= x; i++) {
    int32_t res = 0;
    if (x % i == 0) {
      while (x % i == 0) {
        x /= i;
        res++;
      }
    }
    if (res != 0) {
      a.push_back(res * i);
    }
  }
  if (x != 1) {
    a.push_back(x);
  }
  gen(a.size());
  cout << b << " " << c;
  return 0;
}
