def hcf(a, b) :
    if a % b == 0 :
        return b
    else :
        return hcf( b, a % b )
    
def function(x) :
    ans = [1, x ]
    for i in range( 2, int(x ** (1/2) ) + 1 ) :
        if ( x % i == 0 ) and ( hcf( i, x//i ) == 1 ) :
            if max(ans) > max([i, x//i ] ) :
                ans = [i, x//i ]
    return str(ans[0]) + " " + str(ans[1])

if __name__ == "__main__" :
    x = int(input())
    print(function(x))
