#include <bits/stdc++.h>
using namespace std;
int gcd(long long int x, long long int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long int bmod(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  long long int x = bmod(a, b / 2, m);
  x = (x * x) % m;
  if (b % 2 == 1) x = (x * a) % m;
  return x;
}
long long int prime[1000000];
void SieveOfEratosthenes(long long int n) {
  for (long long int i = 1; i <= 1000000; i++) prime[i] = 1;
  for (long long int p = 2; p * p <= n; p++) {
    if (prime[p] == 1) {
      for (long long int i = p * p; i <= n; i += p) prime[i] = 0;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, a, b;
  cin >> n;
  long long int d = sqrt(n);
  SieveOfEratosthenes(1e6);
  for (long long int i = d; i >= 1; i--) {
    if (n % i) continue;
    a = n / i;
    if (i == 1) {
      cout << a << " " << i << endl;
    } else if (prime[i] && a % i != 0 && i % a != 0) {
      cout << a << " " << i << endl;
      break;
    }
  }
}
