import math
n=int(input())
m=int(math.sqrt(n))
for i in range(m,0,-1):
    if n%i==0:
        j=n//i
        k=i
        t=max(j,k)%min(j,k)
        while t!=0:
            k=min(j,k)
            j=t
            t=max(j,k)%min(j,k)
        if j==1:break

print("%d %d"%(i,n//i))


