import math
n = int(input())
ans=10000000000000
k=[1,n]
for i in range(2,math.ceil(math.sqrt(n))):
    if n%i==0:
        h=n//i
        if ans>h and h%i!=0:
            ans=n//i
            k=[i,ans]
print(*k)        
