import math

#reading
x=int(input())

sq=int(math.sqrt(x))

if x==1:
    print("1 1")
else:
    for i in range(sq,0,-1):
        if x%i==0:
            #lcm=x or not
            if ((i*(x//i))//math.gcd(i,x//i)) !=x:
                continue
            #no is perfectsq
            if x//i==i:
                continue
            
            
            print(x//i,i)
            break
    

        
        
        
    