def factorize(n):  # o(sqr(n))
    c, ans, mi, ma = 2, 0, 1, n
    while (c * c < n):
        if n % c == 0:
            if lcm(c, n // c) ==n:
                mi, ma = c, n // c
        c += 1

    # if c * c == n:
    #     ans += 1
    return mi, ma


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


from math import gcd

n = int(input())
print(*factorize(n))
