from math import *

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

def lcm(a,b):
	return a*b/gcd(a,b)
	
	
n=int(input())

for a in range(int(sqrt(n)),0,-1):
	if n%a==0:
		if lcm(a,n//a)==n:
			print(a,n//a)
			break
	