import math
target=int(input())

def gcd(a,b):
	if (b == 0):
		return a
	return gcd(b, a%b)

def lcm(a,b):
	return (a*b)//gcd(a,b)

mini=0
for i in range(1,int(math.sqrt(target))+1):
	if target%i==0 and lcm(i,target//i)==target:
		mini=i	

# list1=[mini,target//mini]

print(mini,end=' ')
print(target//mini) 