#include<iostream>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int lcm(long long int a,long long int b)
{
    return a / __gcd(a,b)*b;
}
int main()
{
    long long int n,a;
    cin>>n;
    for(long long int i=1;i*i<=n;i++)
    {
        if(n%i==0&&lcm(i,n/i)==n)
        {
            a=i;
        }
    }
    cout<<a<<" "<<n/a<<endl;

    return 0;
}
