import math
def check(x,y):
    ans=((x*y)/(math.gcd(x,y)))
    if ans==n:
        return(True)
    else:
        return(False)
n=int(input())
m=int(math.sqrt(n))
mx=10000000000000000000000000000000000

for i in range(1,m+1):
    if n%i==0:
        if check(i,n//i)==True:
            mxx=max(i,n//i)
            mx=min(mx,mxx)
            ans1,ans2=i,n//i
print(ans1,ans2)
            
