#include <bits/stdc++.h>
using namespace std;
long long gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(int a, int b) { return (a / gcd(a, b)) * b; }
long long mkItll(string str) {
  long long val = 0, len = str.size();
  for (long long i = 0; i < len; i++) {
    val = val * 10 + str[i] - 48;
  }
  return val;
}
long long getSum(long long n) {
  long long sum = 0;
  while (n != 0) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
bool ispalindrome(string s) {
  string t = s;
  s = string(s.rbegin(), s.rend());
  if (s == t)
    return true;
  else
    return false;
}
map<char, int> comp1;
bool cmp(int x, int y) {
  if (comp1[x] > comp1[y])
    return true;
  else
    return false;
}
void fact(int x) {
  vector<int> v;
  int cnt = 0;
  if (x % 2 == 1)
    v.push_back(x);
  else {
    v.push_back(x - 1);
    while (x % 2 == 0 && x > 0) {
      x = x / 2;
      cnt++;
      if (x == 1) {
        x = 0;
      }
    }
    if (x == 0) {
      for (int j = 0; j < cnt; j++) v.push_back(2);
    } else if (x > 1) {
      v.push_back(x);
    }
  }
}
bool isPrime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int mkItInt(string str) {
  int val = 0, len = str.size();
  for (int i = 0; i < len; i++) {
    val = val * 10 + str[i] - 48;
  }
  return val;
}
int binaryToDecimal(int n) {
  int num = n;
  int dec_value = 0;
  int base = 1;
  int temp = num;
  while (temp) {
    int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
int floorSqrt(int x) {
  if (x == 0 || x == 1) return x;
  int i = 1, result = 1;
  while (result <= x) {
    i++;
    result = i * i;
  }
  return i - 1;
}
long long fastpow(long long a, long long b) {
  if (!b) return 1;
  long long sq = fastpow(a, b / 2);
  sq *= sq;
  if (b % 2 != 0) sq *= a;
  return sq;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  if (n <= 4) {
    cout << 1 << " " << n << "\n";
    return 0;
  }
  if (isPrime(n)) {
    cout << 1 << " " << n;
    return 0;
  }
  for (int i = sqrt(n); i >= 2; i--) {
    if (n % i == 0) {
      if (lcm(i, n / i) == n) {
        cout << i << " " << n / i;
        return 0;
      }
    }
  }
  return 0;
}
