#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, b, mn, x, y, i, j;
  while (cin >> n) {
    mn = 1000000000000;
    if (n % 2 == 0) {
      for (i = 2; i <= n; i += 2) {
        if (n % i == 0) {
          a = n / i;
          if (mn > abs(a - i)) {
            mn = abs(a - i);
            x = max(a, i);
            y = min(a, i);
          }
        }
      }
    } else {
      for (i = 1; i <= n; i += 2) {
        if (n % i == 0) {
          a = n / i;
          if (mn > abs(a - i)) {
            mn = abs(a - i);
            x = max(a, i);
            y = min(a, i);
          }
        }
      }
    }
    cout << y << " " << x << endl;
  }
  return 0;
}
