from math import gcd
lcm = lambda x, y: (x * y) // gcd(x, y)


def get_divisors(n):
    x = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            x.append((i, n // i))
    return x

n = int(input())
a = get_divisors(n)[0]
for x, y in get_divisors(n):
    if max(a) > max(x, y) and lcm(x, y) == n: a = (x, y)

print(*a)
