n = int(input()) result = 0 for a in range(int(n**0.5),0,-1): for b in range(1,n+1,1): if n==(a**2)*b: result="{} {}".format(a,b) #print(n,a**2,b) break else: continue break print(result)