import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String line = reader.readLine(); line reader.readLine() reader.readLine reader String[] sarray = line.split(" ", -1); sarray line.split(" ", -1) line.split line " " -1 1 int n = Integer.parseInt(sarray[0]); n Integer.parseInt(sarray[0]) Integer.parseInt Integer sarray[0] sarray 0 int m = Integer.parseInt(sarray[1]); m Integer.parseInt(sarray[1]) Integer.parseInt Integer sarray[1] sarray 1 int matrix[][] = new int[n][m]; matrix new int[n][m] n m for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		} {
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		} String str = reader.readLine(); str reader.readLine() reader.readLine reader String[] mat = str.split(" ", -1); mat str.split(" ", -1) str.split str " " -1 1 for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrix[i][j] = Integer.parseInt(mat[j]);
			} {
				matrix[i][j] = Integer.parseInt(mat[j]);
			} matrix[i][j] = Integer.parseInt(mat[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(mat[j]) Integer.parseInt Integer mat[j] mat j int vector[] = new int[m]; vector new int[m] m for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		} {
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		} String vec = reader.readLine(); vec reader.readLine() reader.readLine reader vector[k] = Integer.parseInt(vec) vector[k] vector k Integer.parseInt(vec) Integer.parseInt Integer vec int result[] = new int[n]; result new int[n] n for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		} int p = 0; int p = 0; p 0 p < n p n p++ p++ p {
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		} {
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		} for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			} int q = 0; int q = 0; q 0 q < m q m q++ q++ q {
				result[p] += matrix[p][q]*vector[q];
			} {
				result[p] += matrix[p][q]*vector[q];
			} result[p] += matrix[p][q]*vector[q] result[p] result p matrix[p][q]*vector[q] matrix[p][q] matrix[p] matrix p q vector[q] vector q System.out.println(result[p]) System.out.println System.out System System.out result[p] result p String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	}
} Main
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] sarray = line.split(" ", -1);
		int n = Integer.parseInt(sarray[0]);
		int m = Integer.parseInt(sarray[1]);
		int matrix[][] = new int[n][m];
		for(int i = 0; i < n; i++){
			String str = reader.readLine();
			String[] mat = str.split(" ", -1);
			for(int j = 0; j < m; j++){
				matrix[i][j] = Integer.parseInt(mat[j]);
			}
		}
		int vector[] = new int[m];
		for(int k = 0; k < m; k++){
			String vec = reader.readLine();
			vector[k] = Integer.parseInt(vec); //j<m k<m
		}
		int result[] = new int[n];
		for(int p = 0; p < n; p++){
			for(int q = 0; q < m; q++){
				result[p] += matrix[p][q]*vector[q];
			}
			System.out.println(result[p]);
		}
	}
}