import math
a=int(input())
du=a*1
lst=[]
pr=[]
w=math.sqrt(a)
score=2
s=1
while a>1:
    if a%score==0:
        s*=score
        a/=score
        continue
    else:
        lst.append(s)
        s=1
    score+=1
x=1
y=1
lst.sort()
for i in range(len(lst)):
    if i%2==0:
        x*=lst[i]
print(x,du//x)
        