#include <bits/stdc++.h>
using namespace std;
const long long inf = LONG_MAX;
const long long arr = 1000000;
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first == b.first)
    return a.second < b.second;
  else
    return a.first < b.first;
}
int main(void) {
  long long mna = 0;
  long long mnb = 0;
  long long mn = LLONG_MAX;
  long long n;
  cin >> n;
  for (int i = 1; i <= arr; i++) {
    long long j = n / i;
    if (i * j == n) {
      if (abs(i - j) < mn) {
        mna = i;
        mnb = j;
        mn = abs(i - j);
      }
    }
  }
  cout << mna << " " << mnb << '\n';
  return 0;
}
