import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int[][] A = new int[a][b]; A new int[a][b] a b int[] B = new int[b]; B new int[b] b for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
				A[i][j] = sc.nextInt();
			} {
				A[i][j] = sc.nextInt();
			} A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			B[i] = sc.nextInt();
		} {
			B[i] = sc.nextInt();
		} B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		} {
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		} int num = 0; num 0 for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			} int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
				num += A[i][j] * B[j];
			} {
				num += A[i][j] * B[j];
			} num += A[i][j] * B[j] num A[i][j] * B[j] A[i][j] A[i] A i j B[j] B j System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int[][] A = new int[a][b];
		int[] B = new int[b];
		
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int i = 0; i < b; i++){
			B[i] = sc.nextInt();
		}
		
		for(int i = 0; i < a; i++){
			int num = 0;
			for(int j = 0; j < b; j++){
				num += A[i][j] * B[j];
			}
			System.out.println(num);
		}

	}

}