#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, mi = 10000005, a, b;
  vector<pair<long long, long long> > m;
  cin >> n;
  double data = sqrt(n);
  if (data == (long long)data)
    a = b = (long long)data;
  else {
    for (long long i = 1; i <= n; i++) {
      data = (double)n / i;
      if (data == (long long)data) m.push_back(make_pair(i, data));
    }
    for (auto i : m)
      if (fabs(i.first - i.second) < mi) {
        mi = fabs(i.first - i.second);
        a = i.first, b = i.second;
      }
    if (a > b) swap(a, b);
  }
  cout << a << ' ' << b << '\n';
}
