#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 10;
const int mod = 1e9 + 7;
int sieve[N];
set<long long> v;
int main() {
  long long n;
  cin >> n;
  long long a, b, t1, t2, diff;
  a = 1, b = n, diff = n - 1;
  for (int i = 1; i * i <= n; i++) {
    t1 = i, t2 = n / i;
    if (n % i == 0) {
      if (t2 - t1 < diff) {
        diff = t2 - t1;
        a = t1;
        b = t2;
      }
    }
  }
  cout << a << " " << b;
  return 0;
}
