#include <bits/stdc++.h>
using namespace std;
struct node {
  int x;
  int y;
  int cha;
} a[1000010];
bool cmp(node a, node b) { return a.cha < b.cha; }
int main() {
  int n;
  cin >> n;
  int div = 0;
  div = sqrt(n);
  if (div * div == n) {
    cout << div << " " << div << endl;
  } else {
    int cnt = 0;
    for (int i = 1; i <= div; i++) {
      if (n % i == 0) {
        a[cnt].x = i;
        a[cnt].y = n / i;
        a[cnt].cha = (a[cnt].y - a[cnt].x);
        cnt++;
      }
    }
    sort(a, a + cnt, cmp);
    cout << a[0].x << " " << a[0].y << endl;
  }
}
