import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int matrixA[][] = new int[n][m]; matrixA new int[n][m] n m int matrixB[] = new int[m]; matrixB new int[m] m int matrixC[] = new int[n]; matrixC new int[n] n for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		} {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		} for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt(); int j = 0; int j = 0; j 0 j < m j m j++ j++ j matrixA[i][j] = sc.nextInt(); matrixA[i][j] = sc.nextInt() matrixA[i][j] matrixA[i] matrixA i j sc.nextInt() sc.nextInt sc for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < m i m i++ i++ i matrixB[i] = sc.nextInt(); matrixB[i] = sc.nextInt() matrixB[i] matrixB i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		} {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		} for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j]; int j = 0; int j = 0; j 0 j < m j m j++ j++ j matrixC[i] += matrixA[i][j] * matrixB[j]; matrixC[i] += matrixA[i][j] * matrixB[j] matrixC[i] matrixC i matrixA[i][j] * matrixB[j] matrixA[i][j] matrixA[i] matrixA i j matrixB[j] matrixB j for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]); int i = 0; int i = 0; i 0 i < n i n i++ i++ i System.out.println(matrixC[i]); System.out.println(matrixC[i]) System.out.println System.out System System.out matrixC[i] matrixC i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int matrixA[][] = new int[n][m];
		int matrixB[] = new int[m];
		int matrixC[] = new int[n];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixA[i][j] = sc.nextInt();
		}

		for (int i = 0; i < m; i++)
			matrixB[i] = sc.nextInt();

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)
				matrixC[i] += matrixA[i][j] * matrixB[j];
		}

		for (int i = 0; i < n; i++)
			System.out.println(matrixC[i]);

	}

}