#include <bits/stdc++.h>
using namespace std;
bool prime[1000000];
void sieve() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= 1000000; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= 1000000; i += p) prime[i] = false;
    }
  }
}
int main() {
  sieve();
  long long x;
  cin >> x;
  vector<pair<long long, long long>> v;
  v.push_back(make_pair(1, x));
  for (int i = 2; i < sqrt(x); i++) {
    if (x % i == 0 && prime[i] == true) {
      v.push_back(make_pair(i, x / i));
    }
  }
  long long ans = INT_MAX;
  long long index1;
  long long index2;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second < ans) {
      index1 = v[i].first;
      index2 = v[i].second;
    }
  }
  cout << index1 << " " << index2 << "\n";
}
