import math 
import collections 
# A function to print all prime factors of  
# a given number n 
def primeFactors(n): 
    l=[] 
    # Print the number of two's that divide n 
    while n % 2 == 0: 
        l.append(2)
        n = n // 2
    for i in range(3,int(math.sqrt(n))+1,2):
        while n % i== 0: 
            l.append(i)
            n = n // i 
              
    # Condition if n is a prime 
    # number greater than 2 
    if n > 2: 
        l.append(n)
    return l
n=int(input())
p=primeFactors(n)
j=1 
ans=1
d=collections.Counter(p)
for i,o in d.items():
    if o==1:
        ans=i 
for i in p:
    if i!=ans:
        j=j*i 
print(ans,j)

        