import sys
import math
 
def read_line():
	return sys.stdin.readline()[:-1]
 
def read_int():
	return int(sys.stdin.readline())
 
def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def gcd(a,b):
	if b==0:
		return a
	else:
		return gcd(b,a%b)
 
x = read_int()
m = -1
for i in range(1,math.ceil(math.sqrt(x))):
	if x%i==0:
		if gcd(i,x//i)==1:
			if (x//i)>m:
				m = i
if x==1:
	print(1,1)
else:
	print(m,(x//m))
