n = int(input()) for i in range(40000,0,-1): if n%(i*i) == 0: print(i,n/(i*i)) exit()