def all_factors(n):
	from functools import reduce
	return set(reduce(list.__add__,([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
x=int(input())
ls=list(all_factors(x))
ls.sort()
ty=0
mini=ls[-1]
for z in range(0,len(ls)-1):
	for i in range(z+1,len(ls)):
		if(ls[z]*ls[i]==x):
			if(ls[i]<mini):
				mini=ls[i]

print(x//mini,end=" ")
print(mini)



	