from math import *
a = int(input())
j = ceil(a)
k = [999999999,999999999]
for x in range(1,j+1):
        for y in range(1,j+1):
            if (x%y==0 or y%x==0) and (x != 1 and y != 1):
                continue
            elif ((x%2 ==0 and y%2==0) or (x%2!= 0 and y%2!=0)):
                continue
            else:
                if x*y == a:
                    if k[0]+k[1] >  x+y:
                        k[0],k[1] = x,y
print(k[0],end=" ")
print(k[1])