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


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

cnt = 0
from collections import defaultdict
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 cnt >= 2:
                break
if num>1:
        fac[num]+=1
if n<=3 or len(fac)==0:
        print (1,n)
else:
        sor = []
        k=0
        for i in fac:
                if k%2:
                        sor.insert(-1, i)
                else:
                        sor.insert(0, i)
        # print(sor)
        pro1, pro2 = 1, 1
        for i in sor:
                if pro1 < pro2:
                        pro1*=i*fac[i]
                else:
                        pro2*=i*fac[i]
        print(pro1, pro2)