import java.io.*;

class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]      = br.readLine().split(" ");
		int in[]          = parseInts(str);
		int in1[][]       = new int[in[0]][in[1]];
		String str1[]     = new String[in[1]];
		int in2[]         = new int[in[1]];
		int x;
		for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		}
		for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		}
		for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		}
	}
	static int[] parseInts(String[] s){
		int[] x = new int[s.length];
		for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		}
		return x;
	}
} import java.io.*; io.* java class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]      = br.readLine().split(" ");
		int in[]          = parseInts(str);
		int in1[][]       = new int[in[0]][in[1]];
		String str1[]     = new String[in[1]];
		int in2[]         = new int[in[1]];
		int x;
		for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		}
		for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		}
		for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		}
	}
	static int[] parseInts(String[] s){
		int[] x = new int[s.length];
		for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		}
		return x;
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]      = br.readLine().split(" ");
		int in[]          = parseInts(str);
		int in1[][]       = new int[in[0]][in[1]];
		String str1[]     = new String[in[1]];
		int in2[]         = new int[in[1]];
		int x;
		for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		}
		for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		}
		for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]      = br.readLine().split(" ");
		int in[]          = parseInts(str);
		int in1[][]       = new int[in[0]][in[1]];
		String str1[]     = new String[in[1]];
		int in2[]         = new int[in[1]];
		int x;
		for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		}
		for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		}
		for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[]      = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int in[]          = parseInts(str); in parseInts(str) parseInts str int in1[][]       = new int[in[0]][in[1]]; in1 new int[in[0]][in[1]] in[0] in 0 in[1] in 1 String str1[]     = new String[in[1]]; str1 new String[in[1]] in[1] in 1 int in2[]         = new int[in[1]]; in2 new int[in[1]] in[1] in 1 int x; x for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		} int i=0; int i=0; i 0 i<in[0] i in[0] in 0 i++ i++ i {
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		} {
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		} str1 = br.readLine().split(" ") str1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " in1[i] = parseInts(str1) in1[i] in1 i parseInts(str1) parseInts str1 for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		} int i=0; int i=0; i 0 i<in[1] i in[1] in 1 i++ i++ i {
			in2[i] = Integer.parseInt(br.readLine());
		} {
			in2[i] = Integer.parseInt(br.readLine());
		} in2[i] = Integer.parseInt(br.readLine()) in2[i] in2 i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		} int n=0; int n=0; n 0 n<in[0] n in[0] in 0 n++ n++ n {
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		} {
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		} x = 0 x 0 for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			} int m=0; int m=0; m 0 m<in[1] m in[1] in 1 m++ m++ m {
				x = in1[n][m] * in2[m] + x;
			} {
				x = in1[n][m] * in2[m] + x;
			} x = in1[n][m] * in2[m] + x x in1[n][m] * in2[m] + x in1[n][m] * in2[m] in1[n][m] in1[n] in1 n m in2[m] in2 m x System.out.println(x) System.out.println System.out System System.out x String[] args args static int[] parseInts(String[] s){
		int[] x = new int[s.length];
		for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		}
		return x;
	} parseInts {
		int[] x = new int[s.length];
		for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		}
		return x;
	} int[] x = new int[s.length]; x new int[s.length] s.length s s.length for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		} int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
			x[i] = Integer.parseInt(s[i]);
		} {
			x[i] = Integer.parseInt(s[i]);
		} x[i] = Integer.parseInt(s[i]) x[i] x i Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i return x; x String[] s s
import java.io.*;

class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]      = br.readLine().split(" ");
		int in[]          = parseInts(str);
		int in1[][]       = new int[in[0]][in[1]];
		String str1[]     = new String[in[1]];
		int in2[]         = new int[in[1]];
		int x;
		for(int i=0; i<in[0]; i++){
			str1 = br.readLine().split(" ");
			in1[i] = parseInts(str1);
		}
		for(int i=0; i<in[1]; i++){
			in2[i] = Integer.parseInt(br.readLine());
		}
		for(int n=0; n<in[0]; n++){
			x = 0;
			for(int m=0; m<in[1]; m++){
				x = in1[n][m] * in2[m] + x;
			}
			System.out.println(x);
		}
	}
	static int[] parseInts(String[] s){
		int[] x = new int[s.length];
		for(int i=0; i<s.length; i++){
			x[i] = Integer.parseInt(s[i]);
		}
		return x;
	}
}