C = int(input()) for i in range(2,C): if C % i == 0: A = i ; B = C // i break print(A,B)