import math #for sqrt and gcd.
def answer(n):
    if n == 1:
        return [1, 1]
    if n == 2:
        return [1, 2]
    if n == 3:
        return [1, 3]
    i = int(math.sqrt(n)) + 1
    while i > 0:
        if (n % i == 0):
            if math.gcd(i, n//i) == 1:
                return [i, n//i]
        i -= 1
    
    return #null


def main():
    X = int(input())
    print(' '.join(map(str, answer(X))))


    return
main()