#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long a, b;
  if (x == 1) {
    a = 1;
    b = 1;
  } else
    for (long long i = 1; i <= x; i++) {
      if (i * i >= x) {
        for (long long j = 1; j < i; j++) {
          if (j * i == x) {
            a = j;
            b = i;
            goto label;
          }
        }
      }
    }
label:
  cout << a << " " << b;
}
