#include <bits/stdc++.h>
using namespace std;
long long int fact(long long int n) {
  if (n == 0 || n == 1)
    return 1;
  else
    return n * fact(n - 1);
}
long long power(long long int base, long long int exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = ((res % 1000000007) * (base % 1000000007));
    base = ((base % 1000000007) * (base % 1000000007));
    exp /= 2;
  }
  return res % 1000000007;
}
long long n, k, m;
long long facti(long long x) {
  long long p = 1;
  for (long long i = 1; i < x + 1; i++)
    p = ((p % 1000000007) * (i % 1000000007)) % 1000000007;
  return p;
}
int solve() {
  long long x;
  cin >> x;
  long long p = x;
  for (long long i = 1; i * i < x; i++) {
    if (x % i == 0) p = min(p, x / i);
  }
  cout << x / p << " " << p;
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
