#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int maxn = 1000 + 5;
int a[maxn], b[maxn];
int main() {
  int n;
  cin >> n;
  int x = -1;
  for (int i = 1; i * i <= n; i++)
    if (!(n % i)) x = i;
  cout << x << endl << n / x << endl;
  return false;
}
