#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int sq = (int)sqrt(n);
  for (int i = sq; i >= 1; i--) {
    if (n % i == 0) {
      if (i == n / i) continue;
      cout << i << " " << n / i << "\n";
      return 0;
    }
  }
  return 0;
}
