#include <bits/stdc++.h>
using namespace std;
pair<int, int> ans;
int n;
int main() {
  cin >> n;
  ans = {-(int)1e9, (int)1e9};
  for (int i = 1; i <= n; ++i) {
    if (n % i) continue;
    int x = n / i, y = i;
    if (x > y) swap(x, y);
    if (ans.second - ans.first > y - x) ans = {x, y};
  }
  cout << ans.first << ' ' << ans.second;
}
