import math
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
N= int(input())
a = 0
b = 0
m = 10**12
def lcm(a, b):
	return a*b//(math.gcd(a,b))
for n in range(1, int(math.sqrt(N))+1):
	if N%n == 0 and lcm(n,N//n) == N and max(n, N//n) < m:
		a = n
		b = N//n
print(a,b)


