#include <bits/stdc++.h>
using namespace std;
vector<bool> st(1000005);
vector<int> prm;
vector<long long> fct;
vector<pair<long long, long long> > ans;
void sieve() {
  int i, j;
  for (i = 3; i <= sqrt(1000005); i += 2) {
    if (!st[i]) {
      for (j = i * i; j <= 1000005; j += i) st[j] = true;
    }
  }
  prm.push_back(2);
  for (i = 3; i <= 1000005; i += 2) {
    if (!st[i]) prm.push_back(i);
  }
}
long long tot;
void solve(int pos, long long mlt) {
  if (pos == fct.size() - 1) {
    ans.push_back({mlt, tot / mlt});
    mlt *= fct[pos];
    ans.push_back({mlt, tot / mlt});
  } else {
    solve(pos + 1, mlt);
    solve(pos + 1, mlt * fct[pos]);
  }
}
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  long long p = a.first, q = a.second, r = b.first, s = b.second;
  if (p < q) swap(p, q);
  if (r < s) swap(r, s);
  return p < r;
}
int main() {
  long long x;
  scanf("%lld", &x);
  if (x == 1) {
    cout << "1 1\n";
    return 0;
  }
  tot = x;
  sieve();
  int i, j;
  for (i = 0; i < prm.size() && prm[i] * prm[i] <= x; i++) {
    if (x % prm[i] == 0) {
      long long xx = 1;
      while (x % prm[i] == 0) {
        x /= prm[i];
        xx *= prm[i];
      }
      fct.push_back(xx);
    }
    if (x == 1) break;
  }
  if (x != 1) fct.push_back(x);
  solve(0, 1);
  sort(ans.begin(), ans.end(), cmp);
  cout << ans[0].first << " " << ans[0].second;
  printf("\n");
  return 0;
}
