def nod(a, b):
	if a % b == 0:
		return b
	return nod(b, a % b)
x = int(input())
d = 1
mx = 100000000000000000000000000
while d * d <= x:
	if x % d == 0:
		s = x // d
		if nod(s, d) != 1:
			d += 1
			continue
		mx = min(mx, max(s, d))
	d += 1
print(x // mx, mx)
