from math import sqrt, gcd

n = int(input())
result = 10 ** 13
for i in range(1, int(sqrt(n)) + 1):
    if n % i == 0:
        a1 = max(i, n // i)
        a2 = min(i, n // i)
        if gcd(a1, a2) == 1 and a1 < result:
            result = a1
else:
    print(result, n // result)
