def gcd(b,c):
    while(b%c!=0):
        c,b=b%c,c
    return(c)


def ras(x):
    if(x==1):
        return([1,1])
    i=1
    a=[]
    while(i<x/i):
        if(x%i==0):
            a.append(i)
        i=i+1
   
    y=len(a)-1
    while(y>=0):
        c=a[y]
        b=int(x/a[y])
        if gcd(b,c)==1:
            return(c,b)
        else:
            y=y-1
x=int(input())
r=ras(x)
print(*r)
