import math
a=int(input())
b=[]
c=[]
w=math.sqrt(a)
for i in range(1,a+1):
    if a%i==0:
        b.append(i)
        c.append(abs(i-w))
m=min(c)
for i in range(len(b)):
    if c[i]==m:
        print(b[i],a//b[i])
    
