from math import gcd
def factors(n):
    return list(([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
n=int(input())
if n==1:
    print('1 1')
else:
    yet_min, elem = float('inf'), None
    res = factors(n)
    for i, e in enumerate(res):
        if e[0] != e[1] and (e[0]*e[1])//gcd(e[0],e[1]) == n:
            y = max(e)
            if y < yet_min:
                yet_min = y
                elem = e
    print(*elem)

