#include <bits/stdc++.h>
using namespace std;
int main() {
  long long X, a = 0;
  cin >> X;
  for (int i = 1; i * i <= X; i++) {
    if (X % i == 0 && i * i != X) {
      if (a < i) a = i;
    }
  }
  if (X == 1)
    cout << "1 1" << endl;
  else {
    long long b = X / a;
    cout << a << " " << b << endl;
  }
}
