from sys import stdin, stdout
import math

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
	
def lcm(a, b):
	return a * b // gcd(a, b)
	
	
x = int(stdin.readline())
lst = []
a = x; b = 1

for i in range(int(math.sqrt(x)), 0, -1):
	if x % i == 0 and lcm(x//i, x//(x//i)) == x:
		if max(x//i, x//(x//i)) < max(a, b):
			a = x//i; b = x//(x//i)

stdout.write(str(b) + ' ' + str(a))