import sys


def main():
    X = int(sys.stdin.readline())

    left = 1
    right = X
    min_v = X

    Q = 2
    R = X // Q
    while Q < R:
        if Q * R == X:
            if max(Q, R) < min_v:
                min_v = max(Q, R)
                left = Q
                right = R

                if left > right:
                    left, right = right, left

        Q += 1
        R = X // Q

    sys.stdout.write(f"{left} {right}\n")


if __name__ == "__main__":
    main()
