#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  if (n == 1) {
    cout << "1 1"
         << "\n";
    return 0;
  }
  int x = n & n - 1;
  if (x == 0) {
    cout << 1 << " " << n << "\n";
    return 0;
  }
  if (ceil(sqrt(n)) == floor(sqrt(n)) && n % 2 != 0) {
    cout << 1 << " " << n << "\n";
    return 0;
  }
  long long j = sqrt(n);
  if (j % 2 == 0) {
    j = sqrt(n) - 1;
  }
  for (long long i = j; i >= 3; i -= 2) {
    if (n % i == 0) {
      cout << i << " " << n / i << "\n";
      return 0;
    }
  }
  cout << 1 << " " << n << "\n";
  return 0;
}
