#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  int r, c;
  int diff = 1000000;
  for (int a = 1; a * a <= n; a++)
    for (int b = a; a * b <= n; b++)
      if (a * b == n && b - a < diff) r = a, c = b;
  cout << r << ' ' << c;
}
