#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 10, MOD = 1e9 + 7;
long long n, m;
bool visited[MAXN];
vector<long long> grf[MAXN];
void doit() {
  vector<long long> v;
  for (long long i = 1; i < sqrt(n); i++) {
    if (n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  }
  sort((v).begin(), (v).end());
  long long a, b;
  long long i = 0, j = v.size() - 1;
  while (i < j) {
    a = v[i];
    b = v[j];
    i++;
    j--;
  }
  cout << a << " " << b;
  cout << "\n";
  ;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  if (n == 1) {
    cout << "1 1";
    cout << "\n";
    ;
  } else {
    doit();
  }
}
