#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fi first
#define se second
#define debugv(v) for (auto& x: v) cerr << x << " "; cerr << '\n';
#define debug2v(v) for (auto& x: v) cerr << x.fi << " - " << x.se << '\n';
using namespace std;
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
 
using ll = long long;
 
template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }  
 
int main(void) {
  FAST
  ll x, ans = 1e18; cin >> x;
  for (ll i = 2; i * i <= x; i++) {
    if (x % i != 0) {
      continue;      
    }
    ll j = x / i;
    if (__gcd(i, j) == 1) {
      uin(ans, max(i, j));
    }  
  }    
  if (!ans) {
    cout << 1 << " " << x << '\n';
    return 0;
  }  ll l = x / ans;
  cout << l << " " << ans << '\n';
  return 0;
}