#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
const int MOD = 1e9 + 7;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  vector<int> factors;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      factors.push_back(i);
    }
  }
  int x1, x2, diff = INT_MAX;
  for (int i = 0; i < factors.size(); i++) {
    for (int j = 0; j < factors.size(); j++) {
      if (factors[i] * factors[j] == n && abs(factors[i] - factors[j]) < diff) {
        diff = abs(factors[i] - factors[j]);
        x1 = factors[i];
        x2 = factors[j];
      }
    }
  }
  cout << min(x1, x2) << " " << max(x1, x2) << endl;
  return 0;
}
