x=int(input())
c=0
c+=x
n = 10**6
prime = {i for i in range(2,n)}
for i in range(2,n):
    if i in prime:
        for j in range(i*2,n,i):
            if j in prime:
                prime.remove(j)
                #エラトステネスの篩
for some in prime:
    if x%some==0:
        while x%some!=0:
            x=x//some
        break
if x!=c:
    print(x,c//x)
else:
    print(1,c)
    