import java.io.*;

public class Main {

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

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	}
} import java.io.*; io.* java public class Main {

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

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] strs = br.readLine().split("\\s+");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] strs = br.readLine().split("\\s+");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strs = br.readLine().split("\\s+"); strs br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" int n = Integer.parseInt(strs[0]); n Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int m = Integer.parseInt(strs[1]); m Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 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++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		} {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		} strs = br.readLine().split("\\s+") strs br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]); int j = 0; int j = 0; j 0 j < m j m j++ j++ j A[i][j] = Integer.parseInt(strs[j]); A[i][j] = Integer.parseInt(strs[j]) A[i][j] A[i] A i j Integer.parseInt(strs[j]) Integer.parseInt Integer strs[j] strs j for (int i = 0; i < m; i++) b[i] = Integer.parseInt(br.readLine()); int i = 0; int i = 0; i 0 i < m i m i++ i++ i 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 < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
			System.out.println(c[i]);
		} 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];
			}
			System.out.println(c[i]);
		} {
			for (int j = 0; j < m; j++) {
				c[i] += A[i][j] * b[j];
			}
			System.out.println(c[i]);
		} 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 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[] strs = br.readLine().split("\\s+");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			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[] strs = br.readLine().split("\\s+");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	}
} Main
import java.io.*;

public class Main {

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

		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		
		for (int i = 0; i < n; i++) {
			strs = br.readLine().split("\\s+");
			for (int j = 0; j < m; j++) A[i][j] = Integer.parseInt(strs[j]);
		}
		
		for (int i = 0; i < m; i++) b[i] = 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];
			}
			System.out.println(c[i]);
		}
		
	}
}