import math

y = int(input())
p = int(math.sqrt(y))
if(p==y):print(1,1)
else:
	for x in range(p+1,0,-1):
		if(y%x == 0):
			z = y//x
			if(z!=x):
				if((x == 1 or z == 1)or (z%x!=0 and x%z!=0)):
					print(z, x)
					break