#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int dev = 1;
    for (int i = 1; i * i <= n; i++) {
      if (n % i == 0) dev = i;
    }
    cout << dev << " " << n / dev << endl;
  }
  return 0;
}
