from itertools import count from math import sqrt def primes(): g = count(2) while True: p = next(g) yield p g = filter(lambda n,p = p:n % p,g) C = int(input()) for A in primes(): if A > sqrt(C): A = 1 break if not C % A: break B = C // A print("%d %d" % (A,B))