#include<bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>v
#define gcd __gcd
#define suffle random_shuffle(v.begin(), v.end());
#define vii vector<pair<int,int>>v
#define tc(n) ll n;cin>>n;
#define bits_count(n) __builtin_popcount(n);
#define sort  sort(v.begin(),v.end());
#define reverse reverse(v.begin(),v.end());
#define for0(i,n) for(int i=0;i<n;i++)
#define for1(i,n) for(int i=1;i<n;i++)
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define F(i,a,b)      for(int i=a;i<=b;i++)
#define ROF(i,a,b)      for(int i=a;i>=b;i--)
#define REP(i,b)        for(int i=0;i<b;i++)
#define mem(a,x)        memset(a,x,sizeof(a))
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
using namespace std;
//------------------------------------------------------------------------------------------------------
ll min(ll a, ll b)
{
if(a<=b)return a;else return b;
}
ll lcm(ll a,ll b)
{
    return ((a*b)/gcd(a,b));
}
//------------------------------------------------------------------------------------------------------
int main()
{
     fio;
     tc(n);
     ll ans=INT_MAX,m=0,g,f,i=0;
     for(i=1;i<=sqrt(n);i++)
     {
         ll k=(n/i);
         if(n%i==0 && (lcm(i,k)==n))
         {
         m=max(i,k);
         if(m<ans)
         {
         ans=m;
         g=i;
         }
         }
     }
     cout<<g<<" "<<(n/g)<<endl;
     return 0;
}