#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
void tr() { cout << "NO\n"; }
void fa() { cout << "YES\n"; }
int main() {
  long long n;
  cin >> n;
  long long a = 1, b = 1;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (i != n / i) {
        a = i;
        b = n / i;
      }
    }
  }
  cout << a << " " << b;
}
