def gcd(a,b):
	while a%b!=0:
		c=b
		b=a%b
		a=c
	return b
import math

X=int(input())
def min(X):
	x=int(math.sqrt(X))
	for i in range(x,0,-1):
		if (X/i)%1==0:
			if gcd(i,X/i)==1:
				return str(i)+' ' +str(X//i)
print(min(X))
		
