#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > v;
void factorize(long long n) {
  int count = 0;
  while (!(n % 2)) {
    n >>= 1;
    count++;
  }
  if (count) v.push_back(make_pair(2, count));
  for (long long i = 3; i <= sqrt(n); i += 2) {
    count = 0;
    while (n % i == 0) {
      count++;
      n = n / i;
    }
    if (count) v.push_back(make_pair(i, count));
  }
  if (n > 2) v.push_back(make_pair(n, 1));
}
int main() {
  long long n;
  scanf("%lld", &n);
  if (n == 1) {
    printf("1 1\n");
  } else {
    bool f = false;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) f = true;
    }
    if (f == false) {
      cout << n << " " << n << endl;
    } else {
      factorize(n);
      vector<long long> ans;
      for (int i = 0; i < v.size(); i++) {
        long long a = v[i].first;
        long long b = v[i].second;
        while (b > 1) {
          a = a * a;
          b--;
        }
        ans.push_back(a);
      }
      long long x = 1;
      long long y = 1;
      sort(ans.begin(), ans.end());
      long long mx = n;
      long long ans_x = 1, ans_y = n;
      for (int i = 0; i < ans.size(); i++) {
        x = x * ans[i];
        y = n / x;
        if (max(x, y) < mx) {
          ans_x = x;
          ans_y = y;
          mx = max(x, y);
        }
      }
      cout << ans_x << " " << ans_y << endl;
    }
  }
  return 0;
}
