#include <iostream>
#include <map>
#include <cmath>
#include <algorithm>
#include <set>
#include <vector>
#include <queue>
#include <stack>
#include <istream>
#include <unordered_set>
#include <unordered_map>
#include <random>
#include <time.h>
#include <chrono>
#include <cstdio>
#include <fstream>
using namespace std;
#define ll long long
#define ld long double
#define all(x) x.begin() , x.end()
#define deb(z) cout << #z << ' ' << z << '\n';
const ll inf = 1e9;
signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    //ifstream cin("stupid_rmq.in");
    //ofstream cout("stupid_rmq.out");
    ll N;
    cin >> N;
    pair <ll , ll> ans = {-1 , -1};
    ll max_ans = 1e9;
    for(ll i = 2; i * i <= N; i++) {
        if(N % i == 0 && __gcd(i , N / i) == 1) {
            if(max(i , N / i) < max_ans) {
                ans = {i , N / i};
                max_ans = max(i , N / i);
            }
        }
    }
    if(ans == make_pair(-1LL , -1LL)) {
        ans = {1 , N};
    }
    cout << ans.first << ' ' << ans.second;
    return 0;
}