def gcd(a,b):
    if(a%b==0):
        return b
    return gcd(b,a%b)
n=int(input())
i=1
maxa=10**18
ans=0
while(i*i<=n):
    if(n%i==0):
        num1=i
        num2=n//i
        if(gcd(num1,num2)==1):
            if(max(num1,num2)<maxa):
                ans=i
            maxa=min(maxa,max(num1,num2))
    i+=1
print(ans,n//ans)
