import math
from math import gcd
n = int(input())
t = math.ceil(n**0.5)
a = float('-inf')
b = float('inf')
def lcm(a,b):
	return (a*b)//gcd(a,b)
for i in range(t-1,0,-1):
	if n%i==0 and lcm(i,n//i)==n:
		b = min(b,n//i)
		a = max(a,i)
if n==1:
	print(1,1)
else:
	print(b,a)