#include <bits/stdc++.h>
using namespace std;
int isPrime(int x) {
  int f = 1;
  for (int i = 2; i <= x / 2; i++) {
    if (x % i == 0) {
      f = 0;
      break;
    }
  }
  return f;
}
int main() {
  int x, a, b;
  cin >> x;
  if (isPrime(x)) {
    cout << 1 << " " << x << endl;
  } else {
    a = sqrt(x) + 1;
    while (x % a != 0) {
      a--;
    }
    b = x / a;
    if (a > b) {
      swap(a, b);
    }
    cout << a << " " << b << endl;
  }
  return 0;
}
