import math

n=int(input())
x=n
i=2
a=[]
while x>1:
    z=1
    while x%i==0:
        x=x//i
        z=z*i
    if z>1:
        a.append(z)
    i+=1

n2=math.sqrt(n)
ans=1
#print(a)
for i in a:
    ans=ans*i
    if ans*i>n2:
        break

print(ans,n//ans)
