import sys
from math import gcd

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	X = mint()
	r = (max(1,X), 1, X)
	for i in range(1,X+1):
		if i*i > X:
			break
		if X % i == 0:
			v = X//i
			if gcd(i, v) == 1:
				r = min(r,(max(i, v), i, v))
	print(*r[1:])

#for i in range(mint()):
solve()
