n = int(input()) for i in range(2, n+1): if(n % i == 0): j = i break b = n // j print(str(b) + " " + str(j))