from sys import*
import math
def fadi_lcm():
	x = int(input())
	y = int(math.sqrt(x))
	if((y*y == x) and (y>1)):
		y = y-1
	i = 0
	while(i<y):
		if(((x%(y-i)) == 0) and (math.gcd((y-i),(int(x/(y-i)))) == 1)):
			print((y-i),int(x/(y-i)))
			break
		else:
			i = i+1
fadi_lcm()