#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long ans = 1e9;
  long long a, b, m;
  pair<long long, long long> p;
  p.first = 1;
  p.second = 1;
  for (long long i = 1; i < sqrt(n); i++) {
    a = i;
    if (n % a == 0) {
      b = n / a;
      m = max(a, b);
      if (m < ans) {
        ans = m;
        p.first = a;
        p.second = b;
      }
    }
  }
  cout << p.first << " " << p.second << endl;
}
