import math

n = int(input())
f = 1
ans = [1e15, 1e15]
while f * f <= n:
	if(n % f == 0 and int(math.gcd(f, int(n / f))) == 1):
		# print(f, n / f)
		if max(f, n / f) < max(ans[0], ans[1]):
			ans[0] = f
			ans[1] = n / f
	f += 1

print(int(ans[0]), int(ans[1]), sep = " ")
