#include <bits/stdc++.h>
using namespace std;
string NumberToString(int Number) {
  ostringstream ss;
  ss << Number;
  return ss.str();
}
int StringToNumber(string Number) {
  int converted;
  istringstream(Number) >> converted;
  return converted;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int num;
  cin >> num;
  if (num % 2 == 0) {
    int start = num / 2;
    int a = 0, b = 0;
    for (int i = start; i >= 2; i -= 2) {
      if (num % i == 0) {
        a = i;
        b = num / i;
        break;
      } else {
        if (a != 0 && b != 0) break;
      }
    }
    cout << a << " " << b << endl;
  } else {
    int start = num / 2 + 1;
    int a = 0, b = 0;
    for (int i = start; i >= 1; i -= 2) {
      if (num % i == 0) {
        a = i;
        b = num / i;
        break;
      } else {
        if (a != 0 && b != 0) break;
      }
    }
    cout << a << " " << b << endl;
  }
}
