#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long t = power(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
int main() {
  int n;
  cin >> n;
  int aa, bb, mn = INT_MAX;
  for (int a = 1; a <= n; a++) {
    int b = n / a;
    if (a * b == n) {
      if (b - a < mn && a <= b) {
        aa = a;
        bb = b;
        mn = b - a;
      }
    }
  }
  cout << aa << " " << bb;
  return 0;
}
