import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	}
}

 import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] queue = new int[n][m]; queue new int[n][m] n m int[] vector = new int[m]; vector new int[m] m int[] vectorAns = new int[n]; vectorAns new int[n] n for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < queue.length i queue.length queue queue.length i++ i++ i {
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < queue[i].length j queue[i].length queue[i] queue i queue[i].length j++ j++ j {
				queue[i][j] = sc.nextInt();
			} {
				queue[i][j] = sc.nextInt();
			} queue[i][j] = sc.nextInt() queue[i][j] queue[i] queue i j sc.nextInt() sc.nextInt sc for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < vector.length i vector.length vector vector.length i++ i++ i {
			vector[i] = sc.nextInt();
		} {
			vector[i] = sc.nextInt();
		} vector[i] = sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		} int i = 0; int i = 0; i 0 i < vectorAns.length i vectorAns.length vectorAns vectorAns.length i++ i++ i {
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		} {
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		} for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			} int j = 0; int j = 0; j 0 j < queue[i].length j queue[i].length queue[i] queue i queue[i].length j++ j++ j {
				vectorAns[i] += queue[i][j] * vector[j];
			} {
				vectorAns[i] += queue[i][j] * vector[j];
			} vectorAns[i] += queue[i][j] * vector[j] vectorAns[i] vectorAns i queue[i][j] * vector[j] queue[i][j] queue[i] queue i j vector[j] vector j for(int data: vectorAns){
			System.out.println(data);
		} int data vectorAns {
			System.out.println(data);
		} {
			System.out.println(data);
		} System.out.println(data) System.out.println System.out System System.out data String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] queue = new int[n][m];
		int[] vector = new int[m];
		int[] vectorAns = new int[n];

		for(int i = 0; i < queue.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				queue[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < vector.length; i++){
			vector[i] = sc.nextInt();
		}
		for(int i = 0; i < vectorAns.length; i++){
			for(int j = 0; j < queue[i].length; j++){
				vectorAns[i] += queue[i][j] * vector[j];
			}
		}
		for(int data: vectorAns){
			System.out.println(data);
		}
	}
}


