#include <bits/stdc++.h>
using namespace std;
void printDivisors(long long n, vector<pair<long long, long long> > &v) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i) continue;
      v.push_back({i, n / i});
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, i;
  cin >> n;
  vector<pair<long long, long long> > v;
  printDivisors(n, v);
  long long mini = INT_MAX;
  pair<long long, long long> p;
  if (n == 1) {
    cout << 1 << " " << 1 << '\n';
    return 0;
  }
  for (i = 0; i < v.size(); i++) {
    if (max(v[i].first, v[i].second) < mini) {
      mini = max(v[i].first, v[i].second);
      p = v[i];
    }
  }
  if (p.first > p.second)
    cout << p.second << " " << p.first << '\n';
  else
    cout << p.first << " " << p.second << '\n';
  return 0;
}
