def gcd(a,b):
    if a == 0:
        return b
    return gcd(b % a, a)
def lcm(a,b):
    return (a*b) / gcd(a,b)

def divisor(x):
    divisors = []
    for i in range(1,int(x**0.5)+1):
        if x%i == 0:
            divisors.append(i)
            if i != x/i:
                divisors.append(x/i)
    return divisors


n = int(input())
x = divisor(n)
r = 0
for i in x:
    if lcm(i,int(n/i)) == n:
        r = i

print(int(r),int(n//r))
