def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)
n = int(input())
i = int(n ** 0.5)
while i != 0:
    if n % i == 0:
        if gcd(i, n // i) == 1:
            print(i, n // i)
            exit()
    i -= 1