def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
def func(x):
    result=[1,x]
    n=int(x**(1/2))+1
    for i in range(2,n):
        if x%i==0 and gcd(i,x//i)==1:
            if max(result)>max([i,x//i]):
                result=[i,x//i]
    return (str(result[0])+" "+str(result[1]))
x=int(input())
print(func(x))