def lcm(x, y):
	import math
	return (x*y)//math.gcd(x,y)

n=int(input())
r=[]
for i in range(1, int(n**0.5)+1):
	if n%i==0:
		r.append([n//i, i])
# print(r)

r.reverse()
for k in r:
	if lcm(k[0], k[1]) == n:
		print(k[0], k[1])
		break