#include <bits/stdc++.h>
using namespace std;
int main() {
  int maxn;
  int s;
  cin >> s;
  for (int y = 1; y * y <= s; y++) {
    if (s % y == 0) maxn = y;
  }
  cout << maxn << " " << s / maxn;
}
