import fractions

X = int(input())

ans = [float("inf"),float("inf")]

for i in range(10 ** 6):
    i += 1

    if X % i == 0:
        j = X // i

        if fractions.gcd(i,j) == 1:
            if max(ans) > max(i,j):
                ans = [i,j]

if ans[0] == float("inf"):
    print (1,X)
else:
    print (ans[0],ans[1])
        