import math
x=int(input(""))
n=int(x**0.5)
if n==1:
    print(1,x)
else:
    for i in range(n,0,-1):
        if x%i==0  and i*i!=x:
            if abs(i*int(x/i))//math.gcd(i,int(x/i))==x:
                break
    print(i,int(x/i))
