#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  long long x;
  cin >> x;
  vector<pair<long long, long long>> v;
  if (x == 1) {
    cout << 1 << " " << 1 << endl;
  } else {
    for (int i = 1; i <= sqrt(x); i++) {
      if (x % i == 0) {
        v.push_back(make_pair(i, x / i));
      }
    }
    sort(v.begin(), v.end());
    int n = v.size();
    for (int i = n - 1; i >= 0; i--) {
      long long l = (v[i].first * v[i].second) / gcd(v[i].first, v[i].second);
      if (l == x) {
        cout << v[i].first << " " << v[i].second << endl;
        break;
      }
    }
  }
  return 0;
}
