#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a = sqrt(n) + 1;
    while (a--) {
      if (n % a == 0) {
        break;
      }
    }
    cout << a << ' ' << n / a << endl;
  }
}
