x = int(input())
pri = []
i = 2
xx = x
while xx > 1:
	if xx%i == 0:
		xx //= i
		pri.append(i)
	else:
		i += 1
	if xx == 1:
		break
	if i**2 > x + 1000:
		pri.append(xx)
		break
d = {}
for i in pri:
	d[i] = 0
for i in pri:
	d[i] += 1
best = 1
for i in range(2**len(d)):
	kan = 1
	for j in range(len(d)):
		if i%2 == 1:
			kan *= (pri[j]**d[pri[j]])
		i //= 2
	if kan**2 <= x and kan > best:
		best = kan
print(best, x//best)