#include <bits/stdc++.h>
using namespace std;
int f(int a, int b, int x, int y) {
  if (a == b) {
    return b;
  }
  if (a < b)
    a += x;
  else
    b += y;
  return f(a, b, x, y);
}
int main() {
  long long int x, a1 = 1, a, b = 1e12;
  cin >> x;
  while (a1 < x / 2) {
    if (x % a1 == 0 && f(x / a1, a1, x / a1, a1) == x && x / a1 < b) {
      b = x / a1;
      a = a1;
    }
    a1++;
  }
  cout << a << " " << b;
  return 0;
}
