M = int(input())
i = 2
div = []
extr = M
while i * i <= M:
    if extr % i == 0:
        div.append(1)
        while extr % i == 0:
            div[-1] *= i
            extr //= i
    i += 1
if extr != 1:
    div.append(extr)
ans = M
for i in range(2**len(div)):
    A = 1
    for j in range(len(div)):
        if i % 2:
            A *= div[j]
        i //= 2
    ans = min(ans, max(A, M // A))
print(M // ans, ans)
