#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j = 0, k, t = 0, gcd = 0, lcm = 0, n, p = 0, q = 0, l = 0;
  cin >> n;
  k = sqrt(n);
  int a[100005];
  if (n % 2 == 1) {
    if (n <= 3)
      cout << "1"
           << " " << n << endl;
    if (n > 3) {
      for (i = 2; i <= k; i++) {
        if (n % i == 0) {
          j++;
          if (i * (n / i) == n) {
            cout << i << " " << n / i << endl;
            break;
          }
        }
      }
      if (j == 0) {
        cout << "1"
             << " " << n << endl;
      }
    }
  } else {
    if (n <= 4)
      cout << "1"
           << " " << n << endl;
    else {
      for (i = 2; i <= k; i++) {
        if (n % i == 0) {
          if ((n / 2) % i == 0 && (n / 2) % (n / i) == 0)
            continue;
          else {
            cout << i << " " << n / i << endl;
            break;
          }
        }
      }
    }
  }
  return 0;
}
