import math

# Function to find HCF the Using Euclidian algorithm
def hcf(x, y):
   while(y):
       x, y = y, x % y
   return x

X=int(input())
arr=[0]*2
if X==1 or X==2 or X==3:
	print('1 '+str(X))
else:	
	signal=False
	for i in range(int(math.sqrt(X)),1,-1):
		if X%i==0:
			arr=[i,X//i]
			if hcf(arr[0],arr[1])==1:
				print(str(arr[0]) + ' ' +str(arr[1]))
				signal=True
				break
	
		
	if signal==False:
			print('1 '+str(X))