#include <bits/stdc++.h>
using namespace std;
const int inf = 99999999;
const int maxn = (1 << 20) + 10;
const long long mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int ans = 1;
  int diff = inf;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      if (n / i - i >= 0 && n / i - i < diff) {
        ans = i;
      }
    }
  }
  cout << ans << " " << n / ans;
  return 0;
}
