import math
n=int(input())
ans=n
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        a=i
        b=n//i
        if math.gcd(i,n//i)==1:
            ans=min(ans,n//i)
print(n//ans,ans)
            
        
