#include <bits/stdc++.h>
using namespace std;
void ini() {}
bool check(long long int n, long long int m, long long int x) {
  long long int res = n * m;
  while (m != 0) {
    long long int temp = m;
    m = n % m;
    n = temp;
  }
  if ((res / n) == x) {
    return true;
  } else {
    return false;
  }
}
int main() {
  ini();
  long long int x;
  cin >> x;
  long long int a = 1, temp, m = INT_MAX;
  while (a <= sqrt(x)) {
    if (x % a == 0 && check(x / a, a, x)) {
      temp = max(x / a, a);
      m = min(m, temp);
    }
    a++;
  }
  cout << m << " " << x / m;
}
