s = int(input()) if s%2 == 0: t = int(s/2) u = 2 else: u = 3 while s%u != 0: u += 2 t = int(s/u) print(f"{t} {u}")