import io
import os

from collections import Counter, defaultdict, deque


def primeFactors(n):
    # Returns a Counter of prime factors of n
    # e.g., 12 returns {2: 2, 3: 1}
    assert n >= 1
    factors = Counter()
    while n % 2 == 0:
        factors[2] += 1
        n //= 2
    x = 3
    while x * x <= n:
        while n % x == 0:
            factors[x] += 1
            n //= x
        x += 2
    if n != 1:
        factors[n] += 1
    return factors

def solve(X, ):
    factors = sorted([k ** v for k, v in primeFactors(X).items()])
    ans1 = 1
    ans2 = 1
    for x in factors[::-1]:
        if ans1 < ans2:
            ans1 *= x
        else:
            ans2 *= x
    return str(ans1) + ' ' + str(ans2)

if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

    X, = [int(x) for x in input().split()]
    ans = solve(X, )
    print(ans)
