n = int(input())
c  =[]
k = n//2
d = 0
for i in range(k+1,1):
    if n%i==0:
        d+=1
        c.append(i)
        if d==2:
            break
if d==2:
    k = c[0]*c[1]
    if k<1*n:
        print(c[0],c[1])
else:
    print(1,n)
