import math import copy n = int(input()) b = math.ceil(math.sqrt(n)) d = 1 for i in range(2,b+1): if n % i == 0: d = i break print(d,n//d)