/***IN THE NAME OF ALMIGHTY ALLAH***/
/***ALHAMDULILLAH***/

/***From dust I have come, dust I will be***/

#include<bits/stdc++.h>
using namespace std;
#define boost ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define start int T;cin>>T;while(T--)
#define line cout<<'\n'
#define pb push_back
#define ll long long
#define Yes cout<<"Yes\n"
#define YES cout<<"YES\n"
#define No cout<<"No\n"
#define NO cout<<"NO\n"
ll lcm(ll a,ll b)
{
    return a/__gcd(a,b)*b;
}
int main()

{
    boost
    ll int n,ans=0,i,j;
    scanf("%lld",&n);
    ll int a=1,b=n,res=n+1;
    if(n%2!=0)
    {
        printf("1 %lld\n",n);
    }
    else
    {
        for(i=1; i*i<=n; i++)
        {
            if(n%i==0 && lcm(i,(n/i))==n)
            {
                ans=i;
            }
        }


        printf("%lld %lld\n",ans,n/ans);
    }

    return 0;
}




