import math
def primeFactors(n):
    ans=[]
    while n % 2 == 0:
        ans.append(2)
        n = n / 2
    for i in range(3, int(math.sqrt(n)) + 1, 2):
        while n % i == 0:
            ans.append(i)
            n = n / i
    if n > 2:
        ans.append(int(n))
    return ans
n=int(input())
prime_factors=primeFactors(n)
a=1
b=1
counter={}
for i in prime_factors:
    if i in counter:
        counter[i]+=1
    else:
        counter[i]=1
for i in counter:
    val=counter[i]
    if a>b:
        b=b*(i**val)
    else:
        a=a*(i**val)
print(a,b)