import java.util.Scanner;

public class Main {

	@SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	}
			
	
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	}
			
	
} Main @SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	} main {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int k k p; p int n n m; m int a[][]; a int b[]; b int c[]; c int g[]; g a = new int[100][100] a new int[100][100] 100 100 b = new int[100] b new int[100] 100 c = new int[100] c new int[100] 100 g = new int[100] g new int[100] 100 n = scan.nextInt() n scan.nextInt() scan.nextInt scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		} k = 0; k = 0 k 0 k < n k n k++ k++ k {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		} {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		} for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			} p = 0; p = 0 p 0 p < m p m p++ p++ p {
				int d = scan.nextInt();
				a[k][p] = d;
				
			} {
				int d = scan.nextInt();
				a[k][p] = d;
				
			} int d = scan.nextInt(); d scan.nextInt() scan.nextInt scan a[k][p] = d a[k][p] a[k] a k p d for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			} p = 0; p = 0 p 0 p < m p m p++ p++ p {
				int e = scan.nextInt();
				b[p] = e;
				
			} {
				int e = scan.nextInt();
				b[p] = e;
				
			} int e = scan.nextInt(); e scan.nextInt() scan.nextInt scan b[p] = e b[p] b p e for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			} k = 0; k = 0 k 0 k < n k n k++ k++ k {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			} {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			} for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				} p = 0; p = 0 p 0 p < m p m p++ p++ p {
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				} {
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				} c[k] = a[k][p] * b[p] c[k] c k a[k][p] * b[p] a[k][p] a[k] a k p b[p] b p g[k] += c[k] g[k] g k c[k] c k for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			} k = 0; k = 0 k 0 k < n k n k++ k++ k {
				System.out.println(g[k]);
				
			} {
				System.out.println(g[k]);
				
			} System.out.println(g[k]) System.out.println System.out System System.out g[k] g k String[] args args public class Main {

	@SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	}
			
	
} public class Main {

	@SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	}
			
	
} Main
import java.util.Scanner;

public class Main {

	@SuppressWarnings("null")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int k, p;
		int n , m;
		int a[][];
		int b[];
		int c[];
		int g[];

		a = new int[100][100];
		b = new int[100];
		c = new int[100];
		g = new int[100];
		n = scan.nextInt();
		m = scan.nextInt();
	
	
		for (k = 0; k < n; k++) {
			for(p = 0; p < m; p++){
				int d = scan.nextInt();
				a[k][p] = d;
				
			}
			
		
		}
			for(p = 0; p < m; p++){
				int e = scan.nextInt();
				b[p] = e;
				
			}
			for (k = 0; k < n; k++) {
				for(p = 0; p < m; p++){
					c[k] = a[k][p] * b[p];
					g[k] += c[k];
				}
				
			
			}
			for (k = 0; k < n; k++) {
				System.out.println(g[k]);
				
			}
			
		
		
		
	}
			
	
}