import math,time
        
def lcm(a, b):
    return a * b // math.gcd(a, b)

x=int(input())
start_time = time.time()
r=int(math.sqrt(x))
c=0
while r>=1:
    c=c-1
    d=int(x/r)
           
    if x%r==0 :
        lc=lcm(d,r) 
        if lc==x:
            print(r,d)
            #print("--- %s seconds ---" % (time.time() - start_time))
            #print(c)
            raise SystemExit()
    r=r-1
    
  