import java.util.Scanner;

// ???Input?????????
// (1) 1???????????°??????????????????(scan.nextInt())
// (2) ??????n????¨????m???????¬??????????(n ?? m)?????????A??¨????????¨?????????
// (3) ????´???°???m???????¬????????????????????????????b??¨????????¨?????????
// (4) n???????????\?????????????????°?????????
	// (4.1) m???????????\?????????????????°?????????
		// (4.1.1) ??°??????????????????
		// (4.1.2) ?????????????????°????????????A???[n - 1][m - 1]???????´???????
// (5) m???????????\?????????????????°?????????
	// (5.1) ??°??????????????????
	// (5.2) ?????????????????°?????????????????????b???[m - 1]???????´???????

// ???Output?????????
// (6) n?????°???????????\?????????????????°?????????
	// (6.1) ?¶????????????????0??§???????????????
	// (6.2) m?????°???????????\?????????????????°?????????
		// (6.2.1) ??????A???[n - 1][m - 1]???????´????????????¨??????????????????b???[m - 1]???????´??????????????????????
		// (6.2.2) ???????????????????¶????????????????
	// (6.3) ?¶??????????????????¨?????????
// (7) scan?????????????????????

public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int matNum = scan.nextInt();
				matrixA[i][j] = matNum;

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz