#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int X, a, b, k, m;
  cin >> X;
  if (X == 1) {
    cout << "1" << ' ' << "1";
    return 0;
  }
  for (a = 25; a > 1; a--)
    for (b = 1; b < a; b++)
      if (((a * b) / gcd(a, b)) == X) {
        k = a;
        m = b;
      }
  cout << m << ' ' << k;
}
