def fun(n,m):
    if n%m == 0:
        return m
    else:
        return fun(m,n%m)
n=int(input())
l=int(n**0.5)
for i in range(l,-1,-1): 
    if n%i==0 and fun(i,n//i)==1:
        break
print(i,n//i)

	   		   	 	  		 			  	  		  	