#include <bits/stdc++.h>
using namespace std;
const int maxn = 10e6 + 1;
int n;
int cont = 0;
int mul[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      mul[cont++] = i;
    }
  }
  if (cont % 2 == 0) {
    cout << mul[(cont / 2) - 1] << ' ' << mul[cont / 2] << '\n';
  } else {
    cout << mul[cont / 2] << ' ' << mul[cont / 2] << '\n';
  }
}
