/**
* ID : 🅼🅾🅷🆂🅸🅽_🆁🅸🅰🅳

🅼🅰🅺🅴 🅸🆃 🆆🅾🆁🅺, 🅼🅰🅺🅴 🅸🆃 🆁🅸🅶🅷🆃, 🅼🅰🅺🅴 🅸🆃 🅵🅰🆂🆃
**/
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout << #x << '=' << x << '\n'
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ja(i,a,n) for (long long i=a;i<sqrt(n);i++)
#define ay(i,a,n) for (int i=n-1;i>=a;i--)
#define GET_loPOS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define GET_hiPOS(c,x) (upper_bound(c.begin(),c.end(),x)-c.begin())
#define CLR(X) memset((X), 0, sizeof((X)))
#define NEG(X) memset((X), -1, sizeof((X)))
#define F first
#define S second
#define mx 1000
#define endl "\n"
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define all(x) (x).begin(),(x).end()
typedef long long ll;
typedef pair<ll,ll> pairs;
typedef unsigned long long llu;
typedef double db;
const int N = 1e5;
const int MX = 2e5+5;
const ll INF = 1e18;
const ll PI = acos((ll)-1);

ll lcm(ll x, ll y) { return (x*y)/__gcd(x,y); }

int main()
{
    IOS
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    bool test = true;
    ll n, a=INT_MAX, b=INT_MAX;
    cin >> n;

    if(n > 5)
    {
        ja(i,2,n)
        {
            if(!(n%i) && test)
            {
                if(lcm(i,n/i) == n)
                {
                    a = min(i,a);
                    b = min(n/i,b);
                }
            }
        }
        cout << a << " " << b << endl;
    }
    else cout << "1 " << n << endl;

    return (0);
}
