x = int(input())   

def gcd(q,p):
    if (p==0):
        return q
    else:
        return gcd(p,q%p)
 
def findab(x):
    i= int(pow(x,0.5))
    while(i>=1):
        if (x%i==0) and (gcd(i,x/i)==1):
            a=i
            b=x//i
            break
            
        i=i-1
    print(a,b)

    
findab(x)