#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, k;
  cin >> x;
  k = sqrt(x);
  bool flag = 1;
  for (k; k >= 1; k--) {
    if (x % k == 0) {
      if (x / k == k) continue;
      cout << k << ' ' << x / k << endl;
      flag = 0;
      break;
    }
  }
  if (flag) cout << "1 " << x << endl;
}
