import java.util.*;
import java.lang.StringBuilder;
public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	}
} import java.util.*; util.* java import java.lang.StringBuilder; StringBuilder java.lang public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	}
} Main public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] st = sc.nextLine().split(" "); st sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int h = Integer.parseInt(st[0]); h Integer.parseInt(st[0]) Integer.parseInt Integer st[0] st 0 int w = Integer.parseInt(st[1]); w Integer.parseInt(st[1]) Integer.parseInt Integer st[1] st 1 int[][] a = new int[h][w]; a new int[h][w] h w int[] b = new int[w]; b new int[w] w int[] c = new int[h]; c new int[h] h for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		} {
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		} st = sc.nextLine().split(" ") st sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			} int o = 0; int o = 0; o 0 o < w o w o++ o++ o {
				a[i][o] = Integer.parseInt(st[o]);
			} {
				a[i][o] = Integer.parseInt(st[o]);
			} a[i][o] = Integer.parseInt(st[o]) a[i][o] a[i] a i o Integer.parseInt(st[o]) Integer.parseInt Integer st[o] st o for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < w i w i++ i++ i {
			b[i] = sc.nextInt();
		} {
			b[i] = sc.nextInt();
		} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		} {
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		} for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			} int o = 0; int o = 0; o 0 o < w o w o++ o++ o {
				c[i] += a[i][o] * b[o];
			} {
				c[i] += a[i][o] * b[o];
			} c[i] += a[i][o] * b[o] c[i] c i a[i][o] * b[o] a[i][o] a[i] a i o b[o] b o for(int i:c){
			System.out.println(i);
		} int i c {
			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) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	}
} Main
import java.util.*;
import java.lang.StringBuilder;
public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String[] st = sc.nextLine().split(" ");
		int h = Integer.parseInt(st[0]);
		int w = Integer.parseInt(st[1]);
		int[][] a = new int[h][w];
		int[] b = new int[w];
		int[] c = new int[h];
		for(int i = 0;i < h;i++){
			st = sc.nextLine().split(" ");
			for(int o = 0;o < w;o++){
				a[i][o] = Integer.parseInt(st[o]);
			}
		}
		for(int i = 0;i < w;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < h;i++){
			for(int o = 0;o < w;o++){
				c[i] += a[i][o] * b[o];
			}
		}
		for(int i:c){
			System.out.println(i);
		}
	}
}