import math


def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a) 
  
def lcm(a,b): 
    return (a*b) / gcd(a,b) 

y = int(input())
p = int(math.sqrt(y))
if(p==y):print(1,1)
else:
	for x in range(p+1,0,-1):
		if(y%x == 0):
			z = y//x
			if(lcm(z,x) == y):
				print(z,x)
				break
				