import  math


n = int(input())

t = int(math.sqrt(n))
min = n
for  i in range(1,t+1):
    if n%i==0 :
        if math.gcd(i,n//i)==1:
            if max(i,n//i) <min:
                min = max(i,n//i)
print(min,n//min)

