
def nod(a, b):
    while a > 0 and b > 0:
        if a > b:
            a %= b
        else:
            b %= a
    return max(a, b)


m = 10 ** 13
q1 = -1
i1 = -1
x = int(input())

sqrtx = int(x ** 0.5)
for i in range(1, sqrtx + 1):
    if x % i == 0:
        q = x // i
        if nod(q, i) * x == i * q and m > max(q, i):
            m = max(q, i)
            q1 = q
            i1 = i
print(q1, i1)
