#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void solve() {
  long long i, n, rem, sum = 0, reqSum, fi, si, ansi, ansj, prev = 0;
  string str;
  int a, b;
  cin >> a;
  for (i = 1; i * i <= a; i++) {
    if (a % i == 0) {
      rem = i;
    }
  }
  cout << rem << " " << a / rem;
}
int mpow(int base, int exp) {
  base %= MOD;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) {
      result = ((long long)result * base);
    }
    base = ((long long)base * base) % MOD;
    exp >>= 1;
  }
  return result;
}
int main() {
  solve();
  return 0;
}
