#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long int x, num, a, b;
  cin >> x;
  num = x;
  vector<long long int> facts;
  long long int p = 1;
  while (num % 2 == 0) {
    p *= 2;
    num /= 2;
  }
  if (p > 1) facts.emplace_back(p);
  for (int i = 3; i * i <= num; i += 2) {
    long long int product = 1;
    while (num % i == 0) {
      product *= i;
      num /= i;
    }
    facts.emplace_back(product);
  }
  if (num > 1) facts.emplace_back(num);
  long long int mn = 1e13;
  facts.emplace_back(1);
  sort(facts.begin(), facts.end());
  p = 1;
  for (auto i : facts) {
    p *= i;
    long long int mx = 0;
    mx = max({p, p / i, mx});
    if (mx < mn) {
      a = i, b = x / i;
    }
  }
  cout << a << " " << b << endl;
  return 0;
}
