def GCD(x, y): 
   while(y): 
       x, y = y, x % y 
   return x 

n = int(input())

x = int(n**.5)

if x==1:
	print(1,n)
else:
	for i in range(x,0,-1):
		
		if (n%i)==0 and i!=(n//i) and GCD(i,n//i)==1:
			print(min(i,n//i), max(i,n//i))
			break
