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