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