#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b) * b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t;
  cin >> t;
  long long int sum = 0;
  if (t == 1)
    cout << "1"
         << " "
         << "1" << '\n';
  else {
    for (long long int i = 1; i * i < t; ++i) {
      if (t % i == 0 && lcm(i, t / i) == t) {
        sum = i;
      }
    }
    cout << sum << " " << t / sum << '\n';
  }
}
