from math import gcd
n = int(input())

def lcm(a, b):
	return (a*b)//gcd(a,b)

ans = [1, n]
i = 0
while (i*i <= n):
	i += 1
	if n%i != 0: 
		continue
	b = n//i
	if lcm(i, b) == n:
		ans = [i, b]

print(ans[1], ans[0])
