def gcd(a, b):
    while b>0:
        a, b = b, a % b
    return a
def nok(a, b):
    return a*b//gcd(a, b)
n = int(input())
p = 1
while p*p <= n:
    if n % p == 0 and nok(n // p, p) == n:
        m = p
    p += 1
print(m, n // m)