from math import gcd, floor
e = int(input())
r = 0
i = 1
while i**2 <= e:
    if not e % i:
        f = floor(e/i)
        l = i/ gcd(i,f) * f
        if l == e:
            r = i
    i += 1

print(r," ", floor(e/r))

     	   		 		    		 			  	  		