import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int[][] A = new int[n][m];
		int[] ans = new int[n];
		for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		}
		for (int ret : ans) {
			System.out.println(ret);
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int[][] A = new int[n][m];
		int[] ans = new int[n];
		for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		}
		for (int ret : ans) {
			System.out.println(ret);
		}
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int[][] A = new int[n][m];
		int[] ans = new int[n];
		for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		}
		for (int ret : ans) {
			System.out.println(ret);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int[][] A = new int[n][m];
		int[] ans = new int[n];
		for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		}
		for (int ret : ans) {
			System.out.println(ret);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m = stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn int[][] A = new int[n][m]; A new int[n][m] n m int[] ans = new int[n]; ans new int[n] n for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		} {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		} for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				A[i][j] = stdIn.nextInt();
			} {
				A[i][j] = stdIn.nextInt();
			} A[i][j] = stdIn.nextInt() A[i][j] A[i] A i j stdIn.nextInt() stdIn.nextInt stdIn for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		} {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		} int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				ans[j] += A[j][i]*b;
			} {
				ans[j] += A[j][i]*b;
			} ans[j] += A[j][i]*b ans[j] ans j A[j][i]*b A[j][i] A[j] A j i b for (int ret : ans) {
			System.out.println(ret);
		} int ret ans {
			System.out.println(ret);
		} {
			System.out.println(ret);
		} System.out.println(ret) System.out.println System.out System System.out ret String[] args args
import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int[][] A = new int[n][m];
		int[] ans = new int[n];
		for (int i=0; i<n; i++) {
			for (int j=0; j<m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for (int i=0; i<m; i++) {
			int b = stdIn.nextInt();
			for (int j=0; j<n; j++) {
				ans[j] += A[j][i]*b;
			}
		}
		for (int ret : ans) {
			System.out.println(ret);
		}
	}
}