from math import *
list1 = []
x = int(input())
for i in range(1, int(sqrt(x))+1):
	if x%i==0:
		if gcd(i, x//i)==1:
			list1.append([max(i, x//i), i, x//i])

list1.sort()
print(str(list1[0][1]), str(list1[0][2]))