from math import ceil, gcd
def fact(x):
    A = []
#    A.append(1)
    A.append(x)
    for i in range(2, ceil(x ** 0.5)):
        if x % i == 0:
#            A.append(i)
            A.append(x // i)
    A.sort()
    return A
def lcm(a, b):
    return a * b / gcd(a, b)
x = int(input())
A = fact(x)
for i in range(len(A)):
    a = A[i]
    b = x // a
    if lcm(a, b) == x:
        print(b, a)
        break
    
