import math m = int(input()) for x in range(2, int(math.sqrt(m)) + 1): if m % x == 0: print(f"{x} {m // x}") exit() print(f"1 {m}")