from math import inf
def factors(n):
	from functools import reduce
	return set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))	

def gcd(x, y):
	while y:
		x, y = y, x % y
	return x

n = int(input())
facs = factors(n)
ans = [inf, inf]
for f in facs:
	a, b = f, n//f
	if a*b//gcd(a, b) == n:
		if max(a, b) < max(ans):
			ans = [a, b]
print(*sorted(ans))