N=int(input()) import math for i in range(int(math.sqrt(N)+1),0,-1): if(N%(i*i)==0): print(i,N//(i*i)) exit()