#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10;
const long long int LINF = 1LL * INF * INF;
const int MAXN = 2e5 + 10;
const int MAXM = 5e3 + 10;
priority_queue<int> pq;
vector<vector<int> > graph;
queue<int> que;
long long int mygcd(long long int a, long long int b) {
  return a ? mygcd(b % a, a) : b;
}
int main() {
  long long int n, m, k, a, b, x, y, q;
  int sum = 0;
  int cnt = 0;
  int mx = 0;
  int mn = INF;
  int cur = 0, idx = -1;
  int tc;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long int res = n;
  for (long long int i = 1; i * i <= n; i++) {
    if (n % i) continue;
    a = mygcd(i, n / i);
    if (a == 1) {
      res = min(n / i, res);
    }
  }
  cout << n / res << " " << res << "\n";
  return 0;
}
