import math

x = int(input())
d = math.floor(x**(1/2))

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

ans = float("inf")
for a in range(1,d+1):
	div, mod = divmod(x,a)
	if mod == 0:
		if gcd(a,div) == 1:
			ans = min(ans, max(a,div))

A = sorted([ans, x//ans])
print(A[0], end = " ")
print(A[1])
		