import java.util.Scanner;

public class Main{


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();//n??????????????????
		int m = scan.nextInt();//m?????????????¨????
		
		int retu[][] = new int[n][m];//??????
		int beku_b[] = new int[m];//???????????????B
		int beku_c[] = new int[n];//???????????????C
		
		//?????????????????????????´?
		for (int cnt_n = 0; cnt_n < n; cnt_n++){
			for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				retu[cnt_n][cnt_m] = scan.nextInt();
			}
		}
		//???????????????B???????????????????´?
		for (int cnt_m = 0; cnt_m < m; cnt_m++) {
			beku_b[cnt_m] = scan.nextInt();
		}
		
		//???????????????C????¨??????¨????´?
		for (int cnt_n = 0; cnt_n < n; cnt_n++){
			for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m];
			}
		}

		//????????????
		for (int cnt_c = 0; cnt_c < n; cnt_c++){
					System.out.println(beku_c[cnt_c]);
			}
		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