def dot(ndarray,array)
    answer = []
    ndarray.each do |part_of_ndarray|
        mult = 0
        array.each_with_index do |number,index|
            mult += part_of_ndarray[index] * number
        end
        answer.push(mult)
    end
    return answer
end

input_info = gets.split.map(&:to_i)
ndmatrix = []
input_info[0].times do
    ndmatrix.push(gets.split.map(&:to_i))
end
matrix = []
input_info[1].times do
    matrix.push(gets.to_i)
end
puts(dot(ndmatrix,matrix))
