#include <bits/stdc++.h>
using namespace std;
bool isprime(long n) {
  for (int i = 2; (long long int)i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
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 findgrouplcm(long long int arr[], long long int n) {
  long long int ans = arr[0];
  for (long long int i = 1; i < n; i++)
    ans = (arr[i] * (ans / (gcd(arr[i], ans))));
  return ans;
}
void solve(int n, long long int s[], long long int p[]);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> (n);
    long long int res = INT_MAX;
    for (long long int i = 1; i * i <= n; i++) {
      if (n % i == 0 and n == ((i * (n / i)) / gcd(i, (n / i)))) {
        res = min(max(i, (n / i)), res);
      }
    }
    cout << (n / res) << " " << res;
  }
  return 0;
}
