def gcd(a,b):
    if b == 0:
        return(a)
    else:
        return(gcd(b,a%b))
def lcm(a,b):
    return(a*b/(gcd(a,b)))
n = int(input())
a = 10**26
b = 10**26
i = 1
while(i*i<=n):
    if n%i == 0:
        if lcm(i,n/i) == n:
            if max(a,b)>max(i,n//i):
                a = i
                b = n//i
    i = i+1
print(min(a,b),end=" ")
print(max(a,b))