def HCF(a, b):
	a1 = max(a, b)
	b1 = min(a, b)
	while b1:
		a1, b1 = b1, a1%b1
	return a1

def pairs(n):
    for i in range(int(n**0.5) + 1, -1, -1):
            if n%i == 0 and HCF(n // i, i) == 1:
                    print(n // i, i)
                    break
	    
n = int(input())
pairs(n)
