#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int remainder, mi = 1000000, a, b, s, sub;
    for (int i = 1; i <= sqrt(n); i++) {
      if (n % i == 0) {
        s = n / i;
        sub = s - i;
        if (sub < mi) {
          mi = sub;
          a = i;
          b = s;
        }
      }
    }
    cout << a << " " << b << endl;
  }
}
