def gcd(a, b):
    if b == 0:
        return a

    return gcd(b, a % b)


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


def solve():
    n = int(input())
    i = 2
    ans = 1

    while i * i < n:
        if n % i == 0 and lcm(i, n // i) == n:
            ans = i
        i += 1

    print(ans, n // ans)


if __name__ == '__main__':
    solve()
