#include <bits/stdc++.h>
using namespace std;
const char* fileNameIn = "main.in";
const char* fileNameOut = "main.out";
const int N = 1;
const int M = N + 7;
long long n, ans;
void divider() {
  for (int i = 1; i * i < n; ++i) {
    if (n % i == 0) {
      ans = i;
    }
  }
}
int main() {
  cin >> n;
  divider();
  if (n == 1) ans = 1;
  printf("%d %d", ans, n / ans);
  return 0;
}
