from math import gcd

x = int(input())
min_max = x
ans = [1, x]

for i in range(2, int(x**0.5) + 1):
	if x % i == 0:
		# print(i, x//i)
		if gcd(i, x//i) == 1:
			if max(i, x//i) < min_max:
				ans = [i, x // i]

print(" ".join([str(item) for item in ans]))