import math
x = int(input())
aux = math.floor(math.sqrt(x))
a, b = 1, x
i = 1
while(i <= aux):
    if(x%i != 0):
        i += 1
        continue
    if(math.gcd(i, x//i) == 1):
        a = i
        b = x//i
    i += 1
print(a, b)
     	 				     	 		  	 	 		