def divisors(n): divs = [] for d in range(1, int(n**0.5) + 1): if n % d == 0: divs.append(d) q = n // d if q != d: divs.append(q) divs.sort() return divs def main(): M = int(input()) divs = divisors(M) if len(divs) == 2: print(1, M) else: print(divs[1], M // divs[1]) main()