def prime_factors(N): d = [] for i in range(2, int(N ** 0.5) + 1): while N % i == 0: d.append(i) N //= i if N != 1: d.append(N) return d M = int(input()) if M == 1: print(1, 1) exit() pf = prime_factors(M) if len(pf) == 1: print(1, M) else: ans = 1 for i in range(1, len(pf)): ans *= pf[i] print(pf[0], ans)