#include <bits/stdc++.h>
using namespace std;
clock_t tp = clock();
const long long mod = 1e9 + 7;
long long int power(long long int a, long long int b) {
  long long int ans = 1;
  a = a;
  while (b > 0) {
    if (b & 1) ans = (ans * a);
    b >>= 1;
    a = (a * a);
  }
  return ans;
}
long long int power1(long long int a, long long int b, long long int m = mod) {
  long long int ans = 1;
  a %= m;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % m;
    b >>= 1;
    a = (a * a) % m;
  }
  return ans;
}
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 ncr(long long int n, long long int r) {
  if (n < r) return 0;
  long long int p = 1, k = 1;
  if (n - r < r) r = n - r;
  if (r != 0) {
    while (r) {
      p *= n;
      k *= r;
      long long int g = gcd(p, k);
      p /= g;
      k /= g;
      n--;
      r--;
    }
  } else
    p = 1;
  return p % mod;
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b) * b);
}
bool compare_increasing(pair<long long int, long long int> l1,
                        pair<long long int, long long int> l2) {
  if (l1.first != l2.first)
    return (l1.first < l2.first);
  else
    return (l1.second < l2.second);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    long long int n, x, y;
    cin >> n;
    for (long long int i = 1; i * i <= n; i++) {
      if (n % i == 0 && gcd(min(i, n / i), max(i, n / i)) == 1)
        x = i, y = n / i;
    }
    cout << x << ' ' << y << '\n';
  }
  return 0;
}
