import math
x=int(input())
c=1000000001
l=[]
for i in range(1,int(math.sqrt(x))+1):
    if x%i==0:
        k=((x//i)*i)//math.gcd(x//i,i)
        if k==x :
            #print(x//i,i)
            if max(x//i,i)<=c:
                c=min(c,max(i,(x//i)))
                l=[i,x//i]
print(*l)                