import java.util.Scanner;

class Clc{
	private int[][] NM;	//n*m?????????
	private int[] M1;	//m???1?????????	
	private int[] result;
	//---?????????????????????---//
	Clc(int[][] nm,int[] m1, int N){
		NM	= 	nm;
		M1	=	m1;
		result = new int[N];
	}
	
	int[] getclc(int N,int M){
		for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		}
		return result;
	}
	int[] get(int N){
		return M1;
	}
	
	
	
}
public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	}

} import java.util.Scanner; Scanner java.util class Clc{
	private int[][] NM;	//n*m?????????
	private int[] M1;	//m???1?????????	
	private int[] result;
	//---?????????????????????---//
	Clc(int[][] nm,int[] m1, int N){
		NM	= 	nm;
		M1	=	m1;
		result = new int[N];
	}
	
	int[] getclc(int N,int M){
		for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		}
		return result;
	}
	int[] get(int N){
		return M1;
	}
	
	
	
} Clc private int[][] NM;	//n*m????????? NM private int[] M1;	//m???1?????????	 M1 private int[] result; result //---?????????????????????---//
	Clc(int[][] nm,int[] m1, int N){
		NM	= 	nm;
		M1	=	m1;
		result = new int[N];
	} Clc {
		NM	= 	nm;
		M1	=	m1;
		result = new int[N];
	} NM	= 	nm NM nm M1	=	m1 M1 m1 result = new int[N] result new int[N] N int[][] nm nm int[] m1 m1 int N N int[] getclc(int N,int M){
		for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		}
		return result;
	} getclc {
		for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		}
		return result;
	} for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		} int x = 0; int x = 0; x 0 x < N x N x++ x++ x {
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		} {
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		} for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			} int y = 0; int y = 0; y 0 y < M y M y++ y++ y {
				result[x]=result[x]+NM[x][y]*M1[y];
			} {
				result[x]=result[x]+NM[x][y]*M1[y];
			} result[x]=result[x]+NM[x][y]*M1[y] result[x] result x result[x]+NM[x][y]*M1[y] result[x] result x NM[x][y]*M1[y] NM[x][y] NM[x] NM x y M1[y] M1 y return result; result int N N int M M int[] get(int N){
		return M1;
	} get {
		return M1;
	} return M1; M1 int N N public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner int[][] NM  = new int[N][M]; NM new int[N][M] N M int[] M1	= new int[M]; M1 new int[M] M for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		} int x = 0 ; int x = 0 ; x 0 x < N x N x++ x++ x {
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		} {
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		} for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			} int y = 0; int y = 0; y 0 y < M y M y++ y++ y {
				NM[x][y]=scanner.nextInt();
			} {
				NM[x][y]=scanner.nextInt();
			} NM[x][y]=scanner.nextInt() NM[x][y] NM[x] NM x y scanner.nextInt() scanner.nextInt scanner for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			M1[i] = scanner.nextInt();
		} {
			M1[i] = scanner.nextInt();
		} M1[i] = scanner.nextInt() M1[i] M1 i scanner.nextInt() scanner.nextInt scanner Clc seki = new Clc(NM, M1, N); seki new Clc(NM, M1, N) int[] result = seki.getclc(N,M); result seki.getclc(N,M) seki.getclc seki N M for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.println(result[i]);
		} {
			System.out.println(result[i]);
		} System.out.println(result[i]) System.out.println System.out System System.out result[i] result i scanner.close() scanner.close scanner String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	}

} public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	}

} Main
import java.util.Scanner;

class Clc{
	private int[][] NM;	//n*m?????????
	private int[] M1;	//m???1?????????	
	private int[] result;
	//---?????????????????????---//
	Clc(int[][] nm,int[] m1, int N){
		NM	= 	nm;
		M1	=	m1;
		result = new int[N];
	}
	
	int[] getclc(int N,int M){
		for(int x = 0; x < N ; x++){
			for(int y = 0; y < M; y++){
				result[x]=result[x]+NM[x][y]*M1[y];
			}
		}
		return result;
	}
	int[] get(int N){
		return M1;
	}
	
	
	
}
public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int[][] NM  = new int[N][M];
		int[] M1	= new int[M];
		
		for(int x = 0 ; x < N ;x++){
			for(int y = 0; y < M ; y++){
				NM[x][y]=scanner.nextInt();
			}
		}
		
		for(int i = 0; i < M ; i++){
			M1[i] = scanner.nextInt();
		}
		
		Clc seki = new Clc(NM, M1, N); 
		int[] result = seki.getclc(N,M);
		
		for(int i = 0;i < N ; i++){
			System.out.println(result[i]);
		}
		scanner.close();
	}

}