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();
	}
} import java.util.Scanner; Scanner java.util 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();
	}
} 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();
	} main {
		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();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int retu[][] = new int[n][m]; retu new int[n][m] n m int beku_b[] = new int[m]; beku_b new int[m] m int beku_c[] = new int[n]; beku_c new int[n] n 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();
			}
		} int cnt_n = 0; int cnt_n = 0; cnt_n 0 cnt_n < n cnt_n n cnt_n++ cnt_n++ cnt_n {
			for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				retu[cnt_n][cnt_m] = scan.nextInt();
			}
		} {
			for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				retu[cnt_n][cnt_m] = scan.nextInt();
			}
		} for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				retu[cnt_n][cnt_m] = scan.nextInt();
			} int cnt_m = 0; int cnt_m = 0; cnt_m 0 cnt_m < m cnt_m m cnt_m++ cnt_m++ cnt_m {
				retu[cnt_n][cnt_m] = scan.nextInt();
			} {
				retu[cnt_n][cnt_m] = scan.nextInt();
			} retu[cnt_n][cnt_m] = scan.nextInt() retu[cnt_n][cnt_m] retu[cnt_n] retu cnt_n cnt_m scan.nextInt() scan.nextInt scan for (int cnt_m = 0; cnt_m < m; cnt_m++) {
			beku_b[cnt_m] = scan.nextInt();
		} int cnt_m = 0; int cnt_m = 0; cnt_m 0 cnt_m < m cnt_m m cnt_m++ cnt_m++ cnt_m {
			beku_b[cnt_m] = scan.nextInt();
		} {
			beku_b[cnt_m] = scan.nextInt();
		} beku_b[cnt_m] = scan.nextInt() beku_b[cnt_m] beku_b cnt_m scan.nextInt() scan.nextInt scan 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];
			}
		} int cnt_n = 0; int cnt_n = 0; cnt_n 0 cnt_n < n cnt_n n cnt_n++ cnt_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_m = 0; cnt_m < m; cnt_m++) {
				beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m];
			}
		} for (int cnt_m = 0; cnt_m < m; cnt_m++) {
				beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m];
			} int cnt_m = 0; int cnt_m = 0; cnt_m 0 cnt_m < m cnt_m m cnt_m++ cnt_m++ cnt_m {
				beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m];
			} {
				beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m];
			} beku_c[cnt_n] += retu[cnt_n][cnt_m] * beku_b[cnt_m] beku_c[cnt_n] beku_c cnt_n retu[cnt_n][cnt_m] * beku_b[cnt_m] retu[cnt_n][cnt_m] retu[cnt_n] retu cnt_n cnt_m beku_b[cnt_m] beku_b cnt_m for (int cnt_c = 0; cnt_c < n; cnt_c++){
					System.out.println(beku_c[cnt_c]);
			} int cnt_c = 0; int cnt_c = 0; cnt_c 0 cnt_c < n cnt_c n cnt_c++ cnt_c++ cnt_c {
					System.out.println(beku_c[cnt_c]);
			} {
					System.out.println(beku_c[cnt_c]);
			} System.out.println(beku_c[cnt_c]) System.out.println System.out System System.out beku_c[cnt_c] beku_c cnt_c scan.close() scan.close scan String[] args args 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();
	}
} 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();
	}
} Main
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();
	}
}