import math
n=int(input())
def gcd(x,y):
	while x%y!=0:
		z=y
		y=x%y
		x=z
	return (y)

a=int(math.sqrt(n))
for i in range(a,0,-1):
	if (n//i)%1==0:
		if gcd(i,n//i)==1:
			print (str(i)+" "+str(n//i))
	