import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		}
		
		for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt();

		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		}
	}

}
 import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		}
		
		for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt();

		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		}
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		}
		
		for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt();

		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		}
		
		for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt();

		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		} {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		} for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt(); int j = 0; int j = 0; j 0 j < m j m j++ j++ j a[i][j] = scanner.nextInt(); a[i][j] = scanner.nextInt() a[i][j] a[i] a i j scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt(); int i = 0; int i = 0; i 0 i < m i m i++ i++ i b[i] = scanner.nextInt(); b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		} {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		} int c = 0; c 0 for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c += (a[i][j] * b[j]);
			} {
				c += (a[i][j] * b[j]);
			} c += (a[i][j] * b[j]) c (a[i][j] * b[j]) a[i][j] a[i] a i j b[j] b j System.out.println(c) System.out.println System.out System System.out c String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				a[i][j] = scanner.nextInt();
		}
		
		for (int i = 0; i < m; i++)
			b[i] = scanner.nextInt();

		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += (a[i][j] * b[j]);
			}
			System.out.println(c);
		}
	}

}

