#include <bits/stdc++.h>
using namespace std;
int n, num, minn;
pair<int, int> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  minn = 1e9;
  for (int i = 1; i <= 1000000; i++) {
    num = n / i;
    if (i <= num && i * num == n) {
      if (minn > num - i) minn = num - i, ans = make_pair(i, num);
    }
  }
  cout << ans.first << " " << ans.second << "\n";
  return 0;
}
