import java.util.Scanner;

// ???Input?????????
// (1) 1???????????°??????????????????(scan.nextInt())
// (2) ??????n????¨????m???????¬??????????(n ?? m)?????????A??¨????????¨?????????
// (3) ????´???°???m???????¬????????????????????????????b??¨????????¨?????????
// (4) n???????????\?????????????????°?????????
	// (4.1) m???????????\?????????????????°?????????
		// (4.1.1) ??°??????????????????
		// (4.1.2) ?????????????????°????????????A???[n - 1][m - 1]???????´???????
// (5) m???????????\?????????????????°?????????
	// (5.1) ??°??????????????????
	// (5.2) ?????????????????°?????????????????????b???[m - 1]???????´???????

// ???Output?????????
// (6) n?????°???????????\?????????????????°?????????
	// (6.1) ?¶????????????????0??§???????????????
	// (6.2) m?????°???????????\?????????????????°?????????
		// (6.2.1) ??????A???[n - 1][m - 1]???????´????????????¨??????????????????b???[m - 1]???????´??????????????????????
		// (6.2.2) ???????????????????¶????????????????
	// (6.3) ?¶??????????????????¨?????????
// (7) scan?????????????????????

public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
} Main public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	} main {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	} int m = 0; m 0 int n = 0; n 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan int[][] matrixA = new int[n][m]; matrixA new int[n][m] n m int[] vectorB = new int[m]; vectorB new int[m] m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int matNum = scan.nextInt();
				matrixA[i][j] = matNum;

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

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

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

			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int matNum = scan.nextInt();
				matrixA[i][j] = matNum;

			} {
				int matNum = scan.nextInt();
				matrixA[i][j] = matNum;

			} int matNum = scan.nextInt(); matNum scan.nextInt() scan.nextInt scan matrixA[i][j] = matNum matrixA[i][j] matrixA[i] matrixA i j matNum for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		} {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		} int vecNum = scan.nextInt(); vecNum scan.nextInt() scan.nextInt scan vectorB[j] = vecNum vectorB[j] vectorB j vecNum for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		} {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		} int sumResult = 0; sumResult 0 for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			} {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			} int sum = (matrixA[i][j]) * (vectorB[j]); sum (matrixA[i][j]) * (vectorB[j]) (matrixA[i][j]) matrixA[i] matrixA i j (vectorB[j]) vectorB j sumResult += sum sumResult sum System.out.println(sumResult) System.out.println System.out System System.out sumResult scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
} public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
} Main
import java.util.Scanner;

// ???Input?????????
// (1) 1???????????°??????????????????(scan.nextInt())
// (2) ??????n????¨????m???????¬??????????(n ?? m)?????????A??¨????????¨?????????
// (3) ????´???°???m???????¬????????????????????????????b??¨????????¨?????????
// (4) n???????????\?????????????????°?????????
	// (4.1) m???????????\?????????????????°?????????
		// (4.1.1) ??°??????????????????
		// (4.1.2) ?????????????????°????????????A???[n - 1][m - 1]???????´???????
// (5) m???????????\?????????????????°?????????
	// (5.1) ??°??????????????????
	// (5.2) ?????????????????°?????????????????????b???[m - 1]???????´???????

// ???Output?????????
// (6) n?????°???????????\?????????????????°?????????
	// (6.1) ?¶????????????????0??§???????????????
	// (6.2) m?????°???????????\?????????????????°?????????
		// (6.2.1) ??????A???[n - 1][m - 1]???????´????????????¨??????????????????b???[m - 1]???????´??????????????????????
		// (6.2.2) ???????????????????¶????????????????
	// (6.3) ?¶??????????????????¨?????????
// (7) scan?????????????????????

public class Main {

	public static void main(String[] args) {

		int m = 0;
		int n = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		m = scan.nextInt();

		int[][] matrixA = new int[n][m];
		int[] vectorB = new int[m];

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

			}
		}
		for (int j = 0; j < m; j++) {
			int vecNum = scan.nextInt();
			vectorB[j] = vecNum;
		}

		for (int i = 0; i < n; i++) {
			int sumResult = 0;
			for (int j = 0; j < m; j++) {
				int sum = (matrixA[i][j]) * (vectorB[j]);
				sumResult += sum;
			}
			System.out.println(sumResult);
		}
		scan.close();
	}
}