import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int[][] aryA = new int[n][m]; aryA new int[n][m] n m int[] aryB = new int[m]; aryB new int[m] m int[] result = new int[n]; result new int[n] n for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		} {
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		} for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				aryA[i][j] = in.nextInt();
			} {
				aryA[i][j] = in.nextInt();
			} aryA[i][j] = in.nextInt() aryA[i][j] aryA[i] aryA i j in.nextInt() in.nextInt in for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			aryB[i] = in.nextInt();
		} {
			aryB[i] = in.nextInt();
		} aryB[i] = in.nextInt() aryB[i] aryB i in.nextInt() in.nextInt in for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		} {
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		} for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				result[i] += aryA[i][j]*aryB[j];
			} {
				result[i] += aryA[i][j]*aryB[j];
			} result[i] += aryA[i][j]*aryB[j] result[i] result i aryA[i][j]*aryB[j] aryA[i][j] aryA[i] aryA i j aryB[j] aryB j for(int i:result){
			System.out.println(i);
		} int i result {
			System.out.println(i);
		} {
			System.out.println(i);
		} System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int[][] aryA = new int[n][m];
		int[] aryB = new int[m];
		int[] result = new int[n];
		
		//??????A???????´????????´?
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				aryA[i][j] = in.nextInt();
			}
		}
		//?????????????????????????´????????´?
		for(int i=0; i<m; i++){
			aryB[i] = in.nextInt();
		}
		//?????????????¨????????????????n x 1???????????????
		for(int i=0; i<n; i++){
			for(int j=0; j<m; j++){
				result[i] += aryA[i][j]*aryB[j];
			}
		}
		//????????¨???
		for(int i:result){
			System.out.println(i);
		}
	}
}