import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

class Main{

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] token = br.readLine().split(" ");
		int a_col = Integer.parseInt(token[0]);
		int a_row = Integer.parseInt(token[1]);
		int b_col = a_row;
		int[][] a = new int[a_col][a_row];
		int[] b = new int[b_col];

		for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		}

		for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		}

		for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io class Main{

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] token = br.readLine().split(" ");
		int a_col = Integer.parseInt(token[0]);
		int a_row = Integer.parseInt(token[1]);
		int b_col = a_row;
		int[][] a = new int[a_col][a_row];
		int[] b = new int[b_col];

		for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		}

		for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		}

		for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		}

	}
} Main public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] token = br.readLine().split(" ");
		int a_col = Integer.parseInt(token[0]);
		int a_row = Integer.parseInt(token[1]);
		int b_col = a_row;
		int[][] a = new int[a_col][a_row];
		int[] b = new int[b_col];

		for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		}

		for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		}

		for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		}

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] token = br.readLine().split(" ");
		int a_col = Integer.parseInt(token[0]);
		int a_row = Integer.parseInt(token[1]);
		int b_col = a_row;
		int[][] a = new int[a_col][a_row];
		int[] b = new int[b_col];

		for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		}

		for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		}

		for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] token = br.readLine().split(" "); token br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a_col = Integer.parseInt(token[0]); a_col Integer.parseInt(token[0]) Integer.parseInt Integer token[0] token 0 int a_row = Integer.parseInt(token[1]); a_row Integer.parseInt(token[1]) Integer.parseInt Integer token[1] token 1 int b_col = a_row; b_col a_row int[][] a = new int[a_col][a_row]; a new int[a_col][a_row] a_col a_row int[] b = new int[b_col]; b new int[b_col] b_col for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		} int i = 0; int i = 0; i 0 i < a_col i a_col i++ i++ i {

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		} {

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		} token = br.readLine().split(" ") token br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			} int j = 0; int j = 0; j 0 j < a_row j a_row j++ j++ j {
				a[i][j] = Integer.parseInt(token[j]);
			} {
				a[i][j] = Integer.parseInt(token[j]);
			} a[i][j] = Integer.parseInt(token[j]) a[i][j] a[i] a i j Integer.parseInt(token[j]) Integer.parseInt Integer token[j] token j for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < b_col i b_col i++ i++ i {
			b[i] = Integer.parseInt(br.readLine());
		} {
			b[i] = Integer.parseInt(br.readLine());
		} b[i] = Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		} int i = 0; int i = 0; i 0 i < a_col i a_col i++ i++ i {

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		} {

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		} int sum = 0; sum 0 for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < a_row j a_row 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 System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

class Main{

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] token = br.readLine().split(" ");
		int a_col = Integer.parseInt(token[0]);
		int a_row = Integer.parseInt(token[1]);
		int b_col = a_row;
		int[][] a = new int[a_col][a_row];
		int[] b = new int[b_col];

		for(int i = 0; i < a_col; i++){

			token = br.readLine().split(" ");

			for(int j = 0; j < a_row; j++){
				a[i][j] = Integer.parseInt(token[j]);
			}

		}

		for(int i = 0; i < b_col; i++){
			b[i] = Integer.parseInt(br.readLine());
		}

		for(int i = 0; i < a_col; i++){

			int sum = 0;

			for(int j = 0; j < a_row; j++){
				sum += a[i][j] * b[j];
			}

			System.out.println(sum);

		}

	}
}