import math
n = input()
m =n 

ans = []
for i in range(2,int(math.sqrt(n)+1)):
	if n%i == 0:
		c = 1
		while n%i == 0:
			n/=i
			c*=i
		ans.append(c)

	if n <i:
		break

if n!= 1:
	ans.append(n)

nums = len(ans)
minv = m+1

ret = (1,m)
for i in range(2**nums):
	v1 = 1
	for j in range(nums):
		if (i>>j)&1:
			v1*=ans[j]
	v2 = m/v1
	if v1+v2<minv:
		ret = (v1,v2)
		minv = v1+v2
print ret[0],ret[1]