from sys import stdin
input = stdin.readline

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

def lcm(a , b):

    return (a * b)//gcd(a,b)



def answer():

    i = int(x ** 0.5)

    ans = x
    a , b = 1 , x
    while(i > 0):

        if(lcm(i , x//i) == x):

            if(ans > (x//i)):
                a = i
                b = x//i

        i -= 1

    return [a , b] 
        

    
for T in range(1):

    x = int(input())


    print(*answer())
