import math

x = int(input())
res = []

def lcm(i,j):
    x = (i*j) / math.gcd(i,j)
    return x

sq = int(x ** (1/2))
res = x
for i in range(2,sq + 1):
    if x%i == 0:
        if lcm(i,x//i) == x:
            res = min ( res , max(i,x//i))

print(x//res,res)
	 				      		   		  	   			