n=int(input())
sqrt=n**(0.5)
ar=[]
ml=1;
def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)
a=0
b=0
for i in range(1,int(sqrt)+1):
    if(n%i==0):
        if (gcd(i,n//i)==1):
            a=i
            b=n//i
print(a,b,end=" ")
