n = int(input())
prime = [1]
test = n
while n%2!=1:
    prime.append(2)
    n = n/2
n1 = pow(n,0.5)
for i in range(3,int(n1)+1,2):
    while n%i==0:
        prime.append(i)
        n = n/i
a1 = 1
a2 = 1
res = pow(10,13)
if test==1:
    print(1,1)
else:
    for i in prime:
        #print(res)
        a1 = a1*i
        a2 = test/a1
    #print(a1,a2,max(a1,a2))
        if max(a1,a2)<res and a1!=a2:
            res = max(a1,a2)
        else:
        #print(i)
            break
    res = int(res)
    print(res,int(test/res))