import math

def lcm(a,b):
    return (a*b)//math.gcd(a,b)

x = int(input())
ans = 1
upper = math.ceil(x**0.5)
for i in range(1,upper):
    if x%i ==0 and lcm(i,x//i) == x:
        ans = i
print(ans, x//ans)
