
from math import sqrt, gcd
x=int(input())
res=float("inf")

ans=[]
for i in range(1,int(sqrt(x)+1)):
    if x%i==0:
        q=x//i

        if max(q,i)<res and (q!=i or q==1):
            res=max(q,i)
            ans=sorted([q,i])
print(*ans)