

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

public class Main{

	/*
	 * n*m A // A[n][m]
	 *
	 * m*1 b // b[m*1]
	 *
	 * A+=b = sysout
	 *
	 * A[ni][mj]
	 *
	 * b[mi]
	 */

	public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	}

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

	/*
	 * n*m A // A[n][m]
	 *
	 * m*1 b // b[m*1]
	 *
	 * A+=b = sysout
	 *
	 * A[ni][mj]
	 *
	 * b[mi]
	 */

	public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	}

} Main public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	} main {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] line  = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n=0 n 0 m=0; m 0 n = Integer.parseInt(line[0]) n Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 m = Integer.parseInt(line[1]) m Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int[][] vector_A = new int[n][m]; vector_A new int[n][m] n m int[] vector_B = new int[m]; vector_B new int[m] m for (int i = 0; i < n; i++) {

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		} {

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		} String [] data = br.readLine().split(" "); data br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			} int j= 0; int j= 0; j 0 j < m j m j++ j++ j {
				vector_A[i][j] = Integer.parseInt(data[j]);
			} {
				vector_A[i][j] = Integer.parseInt(data[j]);
			} vector_A[i][j] = Integer.parseInt(data[j]) vector_A[i][j] vector_A[i] vector_A i j Integer.parseInt(data[j]) Integer.parseInt Integer data[j] data j for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		} {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		} String data2 = br.readLine(); data2 br.readLine() br.readLine br vector_B[i] = Integer.parseInt(data2) vector_B[i] vector_B i Integer.parseInt(data2) Integer.parseInt Integer data2 for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		} {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		} int tot = 0; tot 0 for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				tot += vector_A[i][j] * vector_B[j];

			} {
				tot += vector_A[i][j] * vector_B[j];

			} tot += vector_A[i][j] * vector_B[j] tot vector_A[i][j] * vector_B[j] vector_A[i][j] vector_A[i] vector_A i j vector_B[j] vector_B j System.out.println(tot) System.out.println System.out System System.out tot String[] args args public class Main{

	/*
	 * n*m A // A[n][m]
	 *
	 * m*1 b // b[m*1]
	 *
	 * A+=b = sysout
	 *
	 * A[ni][mj]
	 *
	 * b[mi]
	 */

	public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	}

} public class Main{

	/*
	 * n*m A // A[n][m]
	 *
	 * m*1 b // b[m*1]
	 *
	 * A+=b = sysout
	 *
	 * A[ni][mj]
	 *
	 * b[mi]
	 */

	public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	}

} Main


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

public class Main{

	/*
	 * n*m A // A[n][m]
	 *
	 * m*1 b // b[m*1]
	 *
	 * A+=b = sysout
	 *
	 * A[ni][mj]
	 *
	 * b[mi]
	 */

	public static void main(String[] args) throws IOException {
		//Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// ???????????????
		String[] line  = br.readLine().split(" ");
		int n=0,m=0;
		n = Integer.parseInt(line[0]); // 3
		m = Integer.parseInt(line[1]); // 4

		int[][] vector_A = new int[n][m]; // [3][4]

		int[] vector_B = new int[m]; // [4*1]


		// ?????±?????\??????


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

			// * 1 2 0 1 0 3 0 1 4 1 1 0

			String [] data = br.readLine().split(" ");// ??????????????????????????¶
			for	(int j= 0; j < m; j++){
				vector_A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i = 0; i < m; i++) {// 1230
			String data2 = br.readLine();
			vector_B[i] = Integer.parseInt(data2);
		}

		/*
		 * 1201 0301 4110
		 *
		 * 1230
		 *
		 * 1*1=1, 2*2=4, 0*3=0, 1*0=0 tot=5 ...
		 *
		 *
		 */

		for (int i = 0; i < n; i++) {
			int tot = 0;
			for (int j = 0; j < m; j++) {
				tot += vector_A[i][j] * vector_B[j];

			}
			System.out.println(tot);
		}

		// sc.close();

	}

}