import math
def primeFactors(n): 
    a=[]
    # Print the number of two's that divide n 
    while n % 2 == 0: 
        a.append(2) 
        n = n / 2

    # n must be odd at this point 
    # so a skip of 2 ( i = i + 2) can be used 
    for i in range(3,int(math.sqrt(n))+1,2): 
          
        # while i divides n , print i ad divide n 
        while n % i== 0: 
            a.append(i)
            n = n / i 
              
    # Condition if n is a prime 
    # number greater than 2 
    if n > 2: 
        a.append(n)
    return a
a=primeFactors(int(input()))
a.sort()
# print(a)
x,y=1,1
p=0
for j,i in enumerate(a):
    if j!=0:
        if i==a[j-1]:
            if p==0:
                x*=i
            else:
                y*=i 
        else:
            if x<y:
                x*=i
                p=0
            else:
                y*=i
                p=1
    else:
        x*=i
print(int(x),int(y))