#include <bits/stdc++.h>
using namespace std;
const double E = 2.718281828459;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
const int maxm = 1e2;
void debug() { cout << "_____five___\n"; }
long long a[1000], b[1000];
int tot;
void factor(long long n, long long a[1000], long long b[1000], int &tot) {
  long long i, now;
  long long temp;
  temp = (long long)((double)sqrt(n) + 1);
  tot = 0;
  now = n;
  for (i = 2; i <= temp; ++i)
    if (now % i == 0) {
      a[++tot] = i;
      b[tot] = 0;
      while (now % i == 0) {
        ++b[tot];
        now /= i;
      }
    }
  if (now != 1) {
    a[++tot] = now;
    b[tot] = 1;
  }
}
long long pu(int x, int y) {
  long long sum = 1;
  for (int i = 1; i <= y; ++i) {
    sum *= x;
  }
  return sum;
}
long long number[100], t;
bool cmp(long long x, long long y) { return x > y; }
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
long long putss;
int main(int argc, const char *argv[]) {
  long long x;
  putss = INF;
  long long xx, yy;
  cin >> x;
  for (long long i = 1; i <= sqrt(x); ++i) {
    long long j = x / i;
    if (i * j == x && gcd(i, j) == 1) {
      if (putss > max(i, j)) {
        putss = max(i, j);
        xx = i, yy = j;
      }
    }
  }
  cout << xx << " " << yy << endl;
  return 0;
}
