#include <bits/stdc++.h>
using namespace std;
void In() { freopen("in.in", "r", stdin); }
void Out() { freopen("out.out", "w", stdout); }
const int N = 1e5 + 10;
const int M = 3e5 + 10;
const int Mbit = 1e6 + 10;
const int inf = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
int main() {
  int n, a = 1, b = inf;
  scanf("%d", &n);
  for (int i = 1; n / i >= i; i++) {
    if (n % i == 0) {
      if (n / i - i < b - a) b = n / i, a = i;
    }
  }
  cout << a << ' ' << b << endl;
  return 0;
}
