import math
x = int(input())
c = x
a, b = 1, x
def lcm(u, v):
    return u * v // math.gcd(u, v)
for i in range(1, x):
    if i * i > x:
        break
    if x % i == 0:
        if lcm(i, x // i) == x and max(i, x // i) < c:
            c = max(i, x // i)
            a, b = i, x // i
print(a, b)
		 		 	 					 			 	    	  					