import sys
LI=lambda:list(map(int, sys.stdin.readline().split()))
MI=lambda:map(int, sys.stdin.readline().split())
SI=lambda:sys.stdin.readline().strip('\n')
II=lambda:int(sys.stdin.readline())

from math import sqrt
def gcd(a, b):
	return a if b==0 else gcd(b, a%b)
x=II()
ans=(1, x)
for i in range(2, int(sqrt(x))+1):
	if x%i==0:
		a, b=i, x//i
		if a*b//gcd(a, b)==x:
			ans=(a, b) if max(a, b)<max(ans) else ans
print(*ans)