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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		}

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

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] set = br.readLine().split(" "); set br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(set[0]); n Integer.parseInt(set[0]) Integer.parseInt Integer set[0] set 0 int m = Integer.parseInt(set[1]); m Integer.parseInt(set[1]) Integer.parseInt Integer set[1] set 1 int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		} {
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		} String[] row = br.readLine().split(" "); row br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				A[i][j] = Integer.parseInt(row[j]);
			} {
				A[i][j] = Integer.parseInt(row[j]);
			} A[i][j] = Integer.parseInt(row[j]) A[i][j] A[i] A i j Integer.parseInt(row[j]) Integer.parseInt Integer row[j] row j for(int j = 0; j < m; j++) {
			b[j] = Integer.parseInt(br.readLine());
		} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
			b[j] = Integer.parseInt(br.readLine());
		} {
			b[j] = Integer.parseInt(br.readLine());
		} b[j] = Integer.parseInt(br.readLine()) b[j] b j Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		} {
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		} for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c[i] += A[i][j] * b[j];
			} {
				c[i] += A[i][j] * b[j];
			} c[i] += A[i][j] * b[j] c[i] c i A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(c[i]);
			} {
			System.out.println(c[i]);
			} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		}

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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] set = br.readLine().split(" ");
		int n = Integer.parseInt(set[0]);
		int m = Integer.parseInt(set[1]);
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];

		for(int i = 0; i < n; i++){
			String[] row = br.readLine().split(" ");
			for(int j = 0; j < m; j++) {
				A[i][j] = Integer.parseInt(row[j]);
			}
		}

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

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(c[i]);
			}
		}

}