#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long long int MOD = 1e9 + 7, INF = 1e18;
long long int dx[8] = {0, -1, 1, 0, 1, -1, 1, -1},
              dy[8] = {1, 0, 0, -1, -1, -1, 1, 1};
struct edge {
  long long int cost;
  long long int u, v;
};
vector<int64_t> divisor(int64_t n) {
  vector<int64_t> ret;
  for (int64_t i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int N;
int main() {
  cin >> N;
  auto vec = divisor(N);
  pair<long long int, long long int> p = {N, 1};
  for (long long int i = (((long long int)(vec).size())) - 1, i_begin_ = (0);
       i >= i_begin_; i--) {
    if (vec[i] < N / vec[i]) break;
    if (gcd(vec[i], N / vec[i]) == 1) {
      if (max(p.first, p.second) > vec[i]) {
        p = {vec[i], N / vec[i]};
      }
    }
  }
  cout << p.first << " " << p.second << '\n';
}
