import fractions
x=int(input())

a1=1000000000001
a2=1000000000001
maxi=a1
for i in range(1,1000001):
    if(x%i==0):
        j=x//i
        if(fractions.gcd(i,j)==1 and max(i,j)<maxi):
            
            maxi=max(i,j)
            a1=i
            a2=j
print(a1,a2)

    
    