import math as m
def gcd(a,b):
	if a%b==0:
		return b
	return gcd(b,a%b)
def lcm(a,b):
	return a*b//gcd(a,b)
def isprime(x):
	for i in range(2,m.ceil(m.sqrt(x))+1):
		if x%i==0:
			return False
	return True
x=int(input())
if isprime(x):
	print(1,x)
else:	
	for i in range(m.floor(m.sqrt(x)),0,-1):
		if x%i==0 and lcm(i,x//i)==x :
			print(i,x//i)
			break
