#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long first, t, w;
  edge(long long first, long long t, long long w) : first(first), t(t), w(w) {}
  bool operator<(const edge& e) const { return (w > e.w); }
};
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long fx(long long n, long long md) { return ((n % md) + md) % md; }
void O_o() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
vector<long long> vec;
void primeFactors(long long n) {
  while (n % 2 == 0) {
    vec.push_back(2);
    n = n / 2;
  }
  for (long long i = 3; i <= (long long)sqrt(n); i = i + 2) {
    while (n % i == 0) {
      vec.push_back(i);
      n /= i;
    }
  }
  if (n > 2) {
    vec.push_back(n);
  }
}
int main() {
  O_o();
  long long x;
  cin >> x;
  primeFactors(x);
  long long a = 1, b = 1;
  int i = 0, j = ((int)(vec.size())) - 1;
  while (i <= j) {
    if (i != j) {
      a *= vec[i++];
      b *= vec[j--];
    } else {
      a *= vec[i++];
    }
  }
  long long mn = (((a) < (b)) ? (a) : (b)), mx = (((a) > (b)) ? (a) : (b));
  if ((a * b) / gcd(a, b) != x) {
    vec.clear();
    primeFactors(gcd(a, b));
    int i = 0, j = ((int)(vec.size())) - 1;
    while (i <= j) {
      if (i != j) {
        mn *= vec[i++];
        mx *= vec[j--];
      } else {
        mn *= vec[i++];
      }
      a = mn, b = mx;
      mn = (((a) < (b)) ? (a) : (b)), mx = (((a) > (b)) ? (a) : (b));
    }
  }
  cout << mn << " " << mx << endl;
}
