#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  long long x, b;
  cin >> x;
  long long t = sqrt(x);
  for (long long a = t; a >= 1; a--) {
    if (x % a) continue;
    b = x / a;
    if (gcd(a, b) == 1) {
      cout << a << " " << b << endl;
      break;
    }
  }
  return 0;
}
