def pgcd(a,b):
    if b==0:
        return a
    else:
        return pgcd(b,a%b)

def f(X):
    a=1
    i=int(X**(1/2)//1)
    while a==1:
        if X%i==0 and pgcd(X//i,i)==1:
            a=0
        else:
            i-=1
    t=(i,X//i)
    return t 
X=int(input())

print(f(X)[0],f(X)[1])