n=int(input()) for i in reversed(range(100000)): if n%(i*i)==0: print(i,n//(i*i)) exit()