#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int maxn = 2010;
const int inf = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long x;
  cin >> x;
  for (long long i = sqrt(x); i >= 1; i--) {
    if (x % i == 0) {
      long long tem = x / i;
      if (gcd(tem, i) == 1) {
        cout << min(tem, i) << ' ' << max(tem, i) << endl;
        break;
      }
    }
  }
  return 0;
}
