import math
X=int(input())
ans=X
ans_p=(1,X)
for n in range(1,int(X**0.5+1)):
    if(X%n==0):
        vl=math.gcd(n,X//n)
        if(vl==1):
            mx=max(n,X//n)
            mn=min(n,X//n)
            if(mx<ans):
                ans=mx
                ans_p=(mn,mx)
print(*ans_p)
