from math import ceil,sqrt,gcd

x = int(input())
a = x
m = 1
n = x
for i in range(1,ceil(sqrt(x))):
	if(x%i==0 and gcd(i,x//i)==1):
		b = max(i,x//i)
		if(b<a):
			a=b
			m,n = min(i,x//i),max(i,x//i)
print(m,n)