import math
from collections import defaultdict


def mi():
        return list(map(int, input().split()))


def gcd(a, b):
    if (b == 0):
         return a
    return gcd(b, a % b)


num = int(input())
'''
7639581318
'''

cnt = 0
fac = defaultdict(int)
n = num
ans = num
lol = [1, num]
for i in range(2, int(math.sqrt(num)) + 1):
        while num % i == 0:
                # print(i, num//i)
                fac[i] += 1
                num //= i
                cnt += 1
if num > 1:
        fac[num] += 1
if n <= 3 or len(fac) == 0:
        print(1, n)
else:
        sor = []
        k = 0
        p1, p2 = 1, 1
        t = [i**fac[i] for i in fac]
        t.sort()
        n = len(t)
        for i in range(len(t)//2):
                if k % 2:
                        sor.append(t[i])
                        sor.append(t[n-1-i])
                        p1 *= t[i]
                        p1 *= t[n-1-i]
                else:
                        sor.append(t[i])
                        sor.append(t[n-1-i])
                        p2 *= t[i]
                        p2 *= t[n-1-i]
                k += 1
        if n % 2:
                if p1 < p2:
                        p1 *= t[n//2]
                else:
                        p2 *= t[n//2]
        # print(fac)
        pro1, pro2 = 1, 1

        sor = []
        k = 0
        t = [i**fac[i] for i in fac]
        t.sort()
        for i in range(len(t)//2):
                sor.append(t[i])
                sor.append(t[n-1-i])
        if n % 2:
                sor.append(t[n//2])
        # print(fac)
        pro1, pro2 = 1, 1
        for i in sor:
                if pro1 < pro2:
                        pro1 *= i
                else:
                        pro2 *= i
        if max(p1, p2) < max(pro1, pro2):
                print(p1, p2)
        else:
                print(pro1, pro2)
