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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	}
	
	static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	}
	
	static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[] tmp = parceIntArray(br.readLine().split(" ")); tmp parceIntArray(br.readLine().split(" ")) parceIntArray br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = tmp[0]; n tmp[0] tmp 0 int m = tmp[1]; m tmp[1] tmp 1 tmp = null tmp null int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[][] vector = new int[m][1]; vector new int[m][1] m 1 for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			matrix[i] = parceIntArray(br.readLine().split(" "));
		} {
			matrix[i] = parceIntArray(br.readLine().split(" "));
		} matrix[i] = parceIntArray(br.readLine().split(" ")) matrix[i] matrix i parceIntArray(br.readLine().split(" ")) parceIntArray br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vector[i][0] = Integer.parseInt(br.readLine());
		} {
			vector[i][0] = Integer.parseInt(br.readLine());
		} vector[i][0] = Integer.parseInt(br.readLine()) vector[i][0] vector[i] vector i 0 Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		} {
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		} int sum = 0; sum 0 for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += matrix[i][j] * vector[j][0];
			} {
				sum += matrix[i][j] * vector[j][0];
			} sum += matrix[i][j] * vector[j][0] sum matrix[i][j] * vector[j][0] matrix[i][j] matrix[i] matrix i j vector[j][0] vector[j] vector j 0 System.out.println(sum) System.out.println System.out System System.out sum String[] args args static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	} parceIntArray {
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	} int [] arr = new int[strArr.length]; arr new int[strArr.length] strArr.length strArr strArr.length for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
			arr[i] = Integer.parseInt(strArr[i]);
		} {
			arr[i] = Integer.parseInt(strArr[i]);
		} arr[i] = Integer.parseInt(strArr[i]) arr[i] arr i Integer.parseInt(strArr[i]) Integer.parseInt Integer strArr[i] strArr i return arr; arr String[] strArr strArr public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	}
	
	static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	}
	
	static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] tmp = parceIntArray(br.readLine().split(" "));
		int n = tmp[0];
		int m = tmp[1];
		tmp = null;
		int[][] matrix = new int[n][m];
		int[][] vector = new int[m][1];
		for(int i = 0;i < n;i++){
			matrix[i] = parceIntArray(br.readLine().split(" "));
		}
		for(int i = 0;i < m;i++){
			vector[i][0] = Integer.parseInt(br.readLine());
		}
		for(int i = 0;i < n;i++){
			int sum = 0;
			for(int j = 0;j < m;j++){
				sum += matrix[i][j] * vector[j][0];
			}
			System.out.println(sum);
		}
	}
	
	static int[] parceIntArray(String[] strArr)throws NumberFormatException{
		int [] arr = new int[strArr.length];
		for(int i = 0;i < arr.length;i++){
			arr[i] = Integer.parseInt(strArr[i]);
		}
		return arr;
	}
}