'use strict';
(function(stdin) {
	var lines  = stdin.toString().split('\n');
	var result = (function(params,data) {
		var A = data.slice(0,params[0])
		.map(function(v){return v.split(' ').map(Number);});
		var B = data.slice(params[0],params[0] + params[1]).map(Number);
		var result = [];

		for (var i = 0; i < params[0]; i++) {
			var tmp = 0;
			for (var j = 0; j < params[1]; j++) {
				tmp += A[i][j] * B[j];
			}
			result.push(tmp);
		}

		return result.join('\n');

	}(
	lines.shift().split(' ').map(Number)
	,lines
	));
	console.log(result);

}(require('fs').readFileSync('/dev/stdin', 'utf8')));