c = int(input()) a = 0 b = 0 if c %2 == 0: a = 2 b = c / 2 else: for i in range(3, c, 2): if c %i == 0: a = i b = c / i break print(a, b)