#include <bits/stdc++.h>
using namespace std;
long long INF = 1 << 28;
const double pi = acos(-1.0);
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int dir[4][2] = {1, 0, -1, 0, 0, -1, 0, 1};
int knight[8][2] = {1, 2, 1, -2, 2, 1, 2, -1, -1, 2, -1, -2, -2, 1, -2, -1};
const long double EPS = 1e-7;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
bool cmp(int a, int b) { return a < b; }
int on(int mask, int st) { return mask | (1 << st); }
int off(int mask, int st) { return mask & (~(1 << st)); }
const int mx = 500010;
long long mod = 998244353;
const int sz = 2000005;
bool arr[sz + 5];
long long prime[sz];
int ind = 0;
void Seive() {
  arr[0] = true;
  arr[1] = true;
  arr[2] = false;
  prime[ind++] = 2;
  for (int i = 4; i < sz; i += 2) {
    arr[i] = true;
  }
  long long m = sqrt(sz);
  for (int i = 3; i <= m; i += 2) {
    if (arr[i] == false) {
      for (int j = i * i; j <= sz; j += i << 1) {
        arr[j] = true;
      }
    }
  }
  for (int i = 3; i < sz; i += 2) {
    if (!arr[i]) {
      prime[ind++] = i;
    }
  }
}
vector<pair<long long, long long> > karr;
void numofdiv(long long n) {
  long long q = n;
  int c, ans = 1;
  long long sqt = sqrt(n);
  for (int i = 0; i < ind && prime[i] <= sqt; i++) {
    if (q % prime[i] == 0) {
      c = 0;
      while (q % prime[i] == 0) {
        q /= prime[i];
        c++;
      }
      karr.push_back({prime[i], c});
    }
  }
  c = 0;
  if (q != 1) {
    karr.push_back({q, 1});
  }
  return;
}
long long cummul[mx];
int main() {
  Seive();
  karr.push_back({1, 1});
  long long n;
  scanf("%lld", &n);
  numofdiv(n);
  long long mul = 1;
  cummul[0] = 1;
  for (int i = 1; i < karr.size(); i++) {
    mul = 1;
    for (int j = 0; j < karr[i].second; j++) {
      mul *= karr[i].first;
    }
    cummul[i] = mul;
  }
  long long x, y;
  long long minn = n;
  long long ansx = 1;
  long long ansy = n;
  mul = 1;
  for (int i = 1; i < karr.size(); i++) {
    x = mul;
    y = n / x;
    long long z = max(x, y);
    if (z < minn) {
      minn = z;
      ansx = x;
      ansy = y;
    }
    mul *= cummul[i];
  }
  cout << ansx << " " << ansy << endl;
  return 0;
}
