import math
import itertools


def factor(n):
    """ returns factors grouped by prime """
    factors = []

    prod = 1
    while n % 2 == 0:
        n /= 2
        prod *= 2
    if prod != 1:
        factors.append(prod)

    p = 1
    while n > 1 and p * p <= n:
        p += 2
        if n % p != 0:
            continue
        
        count = 0
        while n % p == 0:
            n /= p
            count += 1
        factors.append(p ** count)

    if n != 1:
        factors.append(n)
    return factors

def subsets(l):
    for size in xrange(len(l) + 1):
        for subset in itertools.combinations(l, size):
            yield subset

X = input()
factors = factor(X)

best = X
# iterate through all subsets of products
for lfactors in subsets(factors):
    # take product
    prod = reduce(lambda acc, f: acc * f, lfactors, 1)

    # see if it is closer to sqrt(X) than previous attempts
    best = min(max(prod, X / prod), best)

# print pair
print ' '.join(map(str, sorted([best, X / best])))