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