def lcm(a,b):
	return (a*b)//(gcd(a,b))
def gcd(a,b):
	if b==0:
		return a
	else:
		return gcd(b,a%b)
def compute(x):
	for i in range(int(x**0.5), 0,-1):
		if x%i==0 and lcm(i,x//i)==x:
			return i,x//i
N=int(input())
print(*compute(N))




