//???????????????????????????????????°??????

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException{
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	}

}
/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