import math
num = input()
num=int(num)
a=1
b=num
m=99999999999999999
r=math.sqrt(num)
r=r+1
r=int(r)
for i in range(1, r):
	if(num%i == 0 and ((int((num/i))*i)/math.gcd(int(num/i),i))==num):
		if(max(int(num/i),i)<m):
			m=max(int(num/i),i)
			a=i
			b=int(num/i)
print("{a} {b}".format(a=a,b=b))
