#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <vector>
#include <map>
#include <set>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <bitset>
using namespace std;
#define  PB push_back
#define  pb pop_back
#define  MP make_pair
#define  endl "\n"
#define  pi 3.1415926535
const    long long INF = 1e9;
const    int N = 2e5+20;
const    long long MOD = 1e9+7;


void ArrayIn (int size, int a []) {
    for (int i = 0; i < size; i++)
        cin >> a [i];
}
void ArrayOut (int size, int a []) {
    for (int i = 0; i < size; i++)
        cout << a [i] << " ";
}

int main () {

    long long n; cin >> n;
    vector <pair <long, long>> v;
    for (int i = 1; i <= sqrt (n); i++) {
        if (n%i==0) {
            v.PB (MP (i, n/i));
            if (__gcd (v.back ().first, v.back ().second) != 1)
                v.pb ();
            if (v.back ().first > v.back ().second)
                swap (v.back ().first, v.back ().second);
        }
    }
    pair <long, long> ans (1e12, 1e12);
    for (auto c : v) {
        if (c.second < ans.second) 
            ans = c;
    }
    cout << ans.first << " " << ans.second;
    return 0;
} 