import math
def next_prime(num):
	while True:
		num += 1
		for i in range(2, int(math.sqrt(num)) + 1):
			if num % i == 0:
				continue
		return num
		
def find_all_factors(num):
	factors = [1, 1]
	last_tried = 1
	while num > 1:
		last_tried = next_prime(last_tried)
		while True:
			if num % last_tried == 0:
				factors.append(last_tried)
				num = num // last_tried
			else:
				break
	return factors
	
def correct_factors(factors):
	corrected = []
	for i in factors:
		if i in corrected:
			corrected[-1] *= i
		else:
			corrected.append(i)
	return corrected
	
def distribute_factors(num, factors, answers = []):
	if len(answers) < len(factors):
		max1 = distribute_factors(num, factors, answers + [1])
		max2 = distribute_factors(num, factors, answers + [0])
		return min(max1, max2)
	else:
		num1 = 1
		for i in range(len(answers)):
			if answers[i]: num1 *= factors[i]
		if num1 == 0: return num
		num2 = num // num1
		return max(num1, num2)

def main(number):
	answer = distribute_factors(number, find_all_factors(number))
	return str(number//answer) + " " + str(answer)


number = int(input())
print(main(number))