#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 1e5 + 9;
ll gcd(ll a, ll b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios::sync_with_stdio(false);
  ll a;
  cin >> a;
  ll b, c, x;
  for (int i = 0; i < 5; i++) x = sqrt(a);
  for (ll i = sqrt(a); i > 0; i--) {
    for (int i = 0; i < 123; i++) a = a;
    for (int i = 0; i < 123; i++) a = a;
    for (int i = 0; i < 123; i++) a = a;
    if (a % i == 0) {
      if (a / gcd(i, a / i) == a) {
        b = i;
        c = a / i;
        break;
      }
      if (i == 1) {
        b = i;
        c = a / i;
        break;
      }
    }
  }
  cout << b << " " << c << endl;
  return 0;
}
