#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  if (n == 1) {
    cout << "1 1"
         << "\n";
  } else {
    long long int minn = INT_MAX;
    vector<long long int> v;
    vector<long long int> vv;
    long long int a = 1, b = n;
    for (long long int i = 1; i <= sqrt(n); i++) {
      if (n % i == 0) {
        if (n / i == i) {
          vv.push_back(i);
        } else {
          vv.push_back(i);
          v.push_back(n / i);
        }
      }
    }
    for (long long int i = v.size() - 1; i >= 0; i--) {
      vv.push_back(v[i]);
    }
    map<long long int, long long int> m;
    for (long long int i = 0; i < vv.size(); i++) {
      long long int x = n / vv[i];
      if (m[vv[i]] == 1 || m[x] == 1) {
        continue;
      } else {
        m[x] = 1;
        m[vv[i]] = 1;
        if (gcd(vv[i], x) == 1) {
          long long int k = max(vv[i], x);
          if (k < minn) {
            a = min(vv[i], x);
            b = max(vv[i], x);
            minn = k;
          }
        }
      }
    }
    cout << a << " " << b << "\n";
  }
  return 0;
}
