import math n = int(input()) if n == 1: print("1 1") else: frag = 0 for i in range(2, int(math.sqrt(n))+1): if(n % i == 0): frag = 1 j = i break if(frag == 1): b = n // j print(str(b) + " " + str(j)) else: print("1 " + str(n))