def fuc(x):
    arr = [0 for i in range(1000001)]
    for i in range(2, int(x ** 0.5) + 5):
        while x % i == 0:
            x //= i
            arr[i] += 1
    return arr

n = int(input())
if n == 2:
    print(1, 2)
    exit()
arr = fuc(n)
ar = []
for i in range(len(arr)):
    if arr[i]:
        ar.append(i ** arr[i])
ar.sort()

k = 2 ** len(ar)
mx = 1000000000000000
aa = 0
bb = 0
for ms in range(k):
    ms = list(map(int, list(bin(ms)[2:])))
    ms = [0] * (len(ar) - len(ms)) + ms
    a = 1
    b = 1
    for i in range(len(ar)):
        if ms[i]:
            a *= ar[i]
        else:
            b *= ar[i]
    if mx > max(a, b):
        mx = max(a, b)
        aa = a
        bb = b
print(aa, bb)
