from math import sqrt
def HCF(a,b):
	a1 = max(a,b)
	b1 = min(a,b)
	while b1:
		a1,b1 = b1,a1%b1
	return a1
n = int(input())
for i in range(int(sqrt(n))+1,-1,-1):
	if not n%i and HCF(n//i,i) == 1:
		print(n//i,i)
		break
