
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] mat = new int[m][n]; mat new int[m][n] m n int[] vec = new int[n]; vec new int[n] n for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		} {
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		} for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			} int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
				mat[i][k] = sc.nextInt();
			} {
				mat[i][k] = sc.nextInt();
			} mat[i][k] = sc.nextInt() mat[i][k] mat[i] mat i k sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			vec[i] = sc.nextInt();
		} {
			vec[i] = sc.nextInt();
		} vec[i] = sc.nextInt() vec[i] vec i sc.nextInt() sc.nextInt sc for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		} {
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		} int c = 0; c 0 for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			} int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
				c += mat[i][k] * vec[k];
			} {
				c += mat[i][k] * vec[k];
			} c += mat[i][k] * vec[k] c mat[i][k] * vec[k] mat[i][k] mat[i] mat i k vec[k] vec k System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		int[][] mat = new int[m][n];
		int[] vec = new int[n];
		for(int i = 0; i < m; i++){
			for(int k = 0; k < n; k++){
				mat[i][k] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++){
			vec[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			int c = 0;
			for(int k = 0; k < n; k++){
				c += mat[i][k] * vec[k];
			}
			System.out.println(c);
		}
	}
}

