import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[][] a = new int[m][n]; a new int[m][n] m n int [] b = new int[n]; b new int[n] n for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		} {
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		} for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				a[i][j] = scan.nextInt();
			} {
				a[i][j] = scan.nextInt();
			} a[i][j] = scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		} int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
			b[k] = scan.nextInt();
		} {
			b[k] = scan.nextInt();
		} b[k] = scan.nextInt() b[k] b k scan.nextInt() scan.nextInt scan for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		} int s = 0; int s = 0; s 0 s < m s m s++ s++ s {
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		} {
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		} int total = 0; total 0 for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			} int t = 0; int t = 0; t 0 t < n t n t++ t++ t {
				total = total + a[s][t] * b[t];
			} {
				total = total + a[s][t] * b[t];
			} total = total + a[s][t] * b[t] total total + a[s][t] * b[t] total a[s][t] * b[t] a[s][t] a[s] a s t b[t] b t System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		
		int m = scan.nextInt();
		int n = scan.nextInt();

		int[][] a = new int[m][n];
		int [] b = new int[n];
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = scan.nextInt();
			}
		}
	
		for(int k = 0; k < n; k++){
			b[k] = scan.nextInt();
		}
		
		for(int s = 0; s < m; s++){
			int total = 0;
			for(int t = 0; t < n; t++){
				total = total + a[s][t] * b[t];
			}
			System.out.println(total);
		}
	}
}