import java.util.Scanner;

class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		int a1, a2, a3, a4;
		int c;
		int a[][];
		int b[];
		int s[];
		
		n = scan.nextInt();
		m = scan.nextInt();
		a = new int[n][m];
		b = new int[m];
		s = new int[n];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		}
		for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		}
		
		for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		}
		
			
	}
}	 import java.util.Scanner; Scanner java.util class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		int a1, a2, a3, a4;
		int c;
		int a[][];
		int b[];
		int s[];
		
		n = scan.nextInt();
		m = scan.nextInt();
		a = new int[n][m];
		b = new int[m];
		s = new int[n];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		}
		for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		}
		
		for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		}
		
			
	}
} Main public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		int a1, a2, a3, a4;
		int c;
		int a[][];
		int b[];
		int s[];
		
		n = scan.nextInt();
		m = scan.nextInt();
		a = new int[n][m];
		b = new int[m];
		s = new int[n];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		}
		for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		}
		
		for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		}
		
			
	} main {	
		Scanner scan = new Scanner(System.in);

		int m, n;
		int a1, a2, a3, a4;
		int c;
		int a[][];
		int b[];
		int s[];
		
		n = scan.nextInt();
		m = scan.nextInt();
		a = new int[n][m];
		b = new int[m];
		s = new int[n];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		}
		for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		}
		
		for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		}
		
			
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int m m n; n int a1 a1 a2 a2 a3 a3 a4; a4 int c; c int a[][]; a int b[]; b int s[]; s n = scan.nextInt() n scan.nextInt() scan.nextInt scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan a = new int[n][m] a new int[n][m] n m b = new int[m] b new int[m] m s = new int[n] s new int[n] n for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		} {
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		} for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a1 = scan.nextInt();
				a[i][j] = a1;
			} {
				a1 = scan.nextInt();
				a[i][j] = a1;
			} a1 = scan.nextInt() a1 scan.nextInt() scan.nextInt scan a[i][j] = a1 a[i][j] a[i] a i j a1 for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
			c = scan.nextInt();
			b[k] = c;
		} {
			c = scan.nextInt();
			b[k] = c;
		} c = scan.nextInt() c scan.nextInt() scan.nextInt scan b[k] = c b[k] b k c for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		} {
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		} for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				s[i] += a[i][j] * b[j];
			} {
				s[i] += a[i][j] * b[j];
			} s[i] += a[i][j] * b[j] s[i] s i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(s[i]) System.out.println System.out System System.out s[i] s i String args[] args
import java.util.Scanner;

class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		int a1, a2, a3, a4;
		int c;
		int a[][];
		int b[];
		int s[];
		
		n = scan.nextInt();
		m = scan.nextInt();
		a = new int[n][m];
		b = new int[m];
		s = new int[n];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				a1 = scan.nextInt();
				a[i][j] = a1;
			}
		}
		for(int k = 0; k < m;k++){
			c = scan.nextInt();
			b[k] = c;
		}
		
		for(int i = 0; i < n ;i++){
			for(int j = 0; j < m; j++){
				s[i] += a[i][j] * b[j];
			}
			System.out.println(s[i]);
		}
		
			
	}
}	