def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)
def lcm(a, b):
    return (a * b) / gcd(a, b)
n = int(input())
i = 1
while i**2 <= n:
        if n % i == 0:
            if lcm(i, n/i) == n:
                r = i
        i += 1
print(r, n//r)


