try:
    n=int(input())
    A=[]
    k=int(n**(1/2))
    for i in range(1,k+1):
        if(n%i==0):
            B=[i,n//i]
            A.append(B)
    for i in range(len(A)-1,-1,-1):
        x=A[i][0]
        y=A[i][1]
        while(y):
            x,y=y,x%y
        if(x==1):
            print(A[i][0],A[i][1])
            break
except:
    pass