#include <bits/stdc++.h>
#pragma GCC optimize("O3")
constexpr auto INF = 9223372036854775807;
using namespace std;
inline int mex(unordered_set<int> st) {
  int m = 0;
  while (st.find(m) != st.end()) {
    m += 1;
  }
  return m;
}
inline int calculateGrundy(int n) {
  if (n == 1) return 0;
  unordered_set<int> mexi;
  for (int i = 1; i <= sqrt(n); i += 1) {
    if (n % i == 0) {
      if (n / i != n) mexi.insert(calculateGrundy(n / i));
      mexi.insert(calculateGrundy(i));
    }
  }
  return mex(mexi);
}
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
bool check(long long int a) {
  long long int count = 0;
  while (a % 2 == 0) {
    a /= 2;
    count += 1;
  }
  if (count > 1) return false;
  bool flag = true;
  for (long long int i = 3; i <= sqrt(a); i += 2) {
    if (a % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
long long int sum(long long int n) { return (n * (n + 1)) / 2; }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long int n;
  cin >> n;
  long long int mini = INF, f = 0, s = 0;
  for (long long int i = 1; i <= sqrt(n); i += 1) {
    if (n % i == 0) {
      if (max(i, n / i) < mini) {
        if (min(i, n / i) == 1 || i != n / i) {
          mini = max(i, n / i);
          f = i;
          s = n / i;
        }
      }
    }
  }
  cout << f << " " << s;
}
