
import java.util.*;

class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		
		//整数nと整数mを受け取る
		String s1 = sc.next();
		int n = Integer.parseInt(s1);
		String s2 = sc.next();
		int m = Integer.parseInt(s2);
		
		//配列Aにはn*mの行列の値を格納
		int A[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		}
		
		//配列bにはm*1の行列の値を格納
		int b[] = new int[m];
		for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		}
		
		//配列cにはn*1行列をAとbの行列から与えられた条件通りに計算したものを格納し、cの要素を表示する
		int c[] = new int[n];
		for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		
		//整数nと整数mを受け取る
		String s1 = sc.next();
		int n = Integer.parseInt(s1);
		String s2 = sc.next();
		int m = Integer.parseInt(s2);
		
		//配列Aにはn*mの行列の値を格納
		int A[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		}
		
		//配列bにはm*1の行列の値を格納
		int b[] = new int[m];
		for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		}
		
		//配列cにはn*1行列をAとbの行列から与えられた条件通りに計算したものを格納し、cの要素を表示する
		int c[] = new int[n];
		for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		}
	}
} Main public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		
		//整数nと整数mを受け取る
		String s1 = sc.next();
		int n = Integer.parseInt(s1);
		String s2 = sc.next();
		int m = Integer.parseInt(s2);
		
		//配列Aにはn*mの行列の値を格納
		int A[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		}
		
		//配列bにはm*1の行列の値を格納
		int b[] = new int[m];
		for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		}
		
		//配列cにはn*1行列をAとbの行列から与えられた条件通りに計算したものを格納し、cの要素を表示する
		int c[] = new int[n];
		for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		}
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		//整数nと整数mを受け取る
		String s1 = sc.next();
		int n = Integer.parseInt(s1);
		String s2 = sc.next();
		int m = Integer.parseInt(s2);
		
		//配列Aにはn*mの行列の値を格納
		int A[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		}
		
		//配列bにはm*1の行列の値を格納
		int b[] = new int[m];
		for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		}
		
		//配列cにはn*1行列をAとbの行列から与えられた条件通りに計算したものを格納し、cの要素を表示する
		int c[] = new int[n];
		for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s1 = sc.next(); s1 sc.next() sc.next sc int n = Integer.parseInt(s1); n Integer.parseInt(s1) Integer.parseInt Integer s1 String s2 = sc.next(); s2 sc.next() sc.next sc int m = Integer.parseInt(s2); m Integer.parseInt(s2) Integer.parseInt Integer s2 int A[][] = new int[n][m]; A new int[n][m] n m for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		} {
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		} for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			} {
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			} String s3 = sc.next(); s3 sc.next() sc.next sc int a = Integer.parseInt(s3); a Integer.parseInt(s3) Integer.parseInt Integer s3 A[i][j] = a A[i][j] A[i] A i j a int b[] = new int[m]; b new int[m] m for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		} {
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		} String s4 = sc.next(); s4 sc.next() sc.next sc int b1 = Integer.parseInt(s4); b1 Integer.parseInt(s4) Integer.parseInt Integer s4 b[i] = b1 b[i] b i b1 int c[] = new int[n]; c new int[n] n for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		} {
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		} int sum = 0; sum 0 for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += A[i][j] * b[j];
			} {
				sum += A[i][j] * b[j];
			} sum += A[i][j] * b[j] sum A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j c[i] = sum c[i] c i sum System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String args[] args

import java.util.*;

class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		
		//整数nと整数mを受け取る
		String s1 = sc.next();
		int n = Integer.parseInt(s1);
		String s2 = sc.next();
		int m = Integer.parseInt(s2);
		
		//配列Aにはn*mの行列の値を格納
		int A[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				String s3 = sc.next();
				int a = Integer.parseInt(s3);
				A[i][j] = a;
			}
		}
		
		//配列bにはm*1の行列の値を格納
		int b[] = new int[m];
		for(int i = 0; i < m; i++){
			String s4 = sc.next();
			int b1 = Integer.parseInt(s4);
			b[i] = b1;
		}
		
		//配列cにはn*1行列をAとbの行列から与えられた条件通りに計算したものを格納し、cの要素を表示する
		int c[] = new int[n];
		for(int i = 0; i < n; i++){
			int sum = 0;
			for(int j = 0; j < m; j++){
				sum += A[i][j] * b[j];
			}
			c[i] = sum;
			System.out.println(c[i]);
		}
	}
}