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


n = int(input())
arr = [1]
i = 1
answer_a, answer_b = 1, 1
while i * i < n:
    if n % i == 0:
        a = i
        b = n // i
        if gcd(a, b) == 1:
            answer_a, answer_b = a, b
    i += 1
print(answer_a, answer_b)
