import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int n,m;

		Scanner stdIn = new Scanner(System.in);

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

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

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

		int[] vectorB = new int[m];

		for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		}

		int[] vectorC = new int[n];

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

		for(int i : vectorC) {
			System.out.println(i);
		}
	}

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

	public static void main(String[] args) {

		int n,m;

		Scanner stdIn = new Scanner(System.in);

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

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

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

		int[] vectorB = new int[m];

		for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		}

		int[] vectorC = new int[n];

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

		for(int i : vectorC) {
			System.out.println(i);
		}
	}

} Main public static void main(String[] args) {

		int n,m;

		Scanner stdIn = new Scanner(System.in);

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

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

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

		int[] vectorB = new int[m];

		for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		}

		int[] vectorC = new int[n];

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

		for(int i : vectorC) {
			System.out.println(i);
		}
	} main {

		int n,m;

		Scanner stdIn = new Scanner(System.in);

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

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

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

		int[] vectorB = new int[m];

		for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		}

		int[] vectorC = new int[n];

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

		for(int i : vectorC) {
			System.out.println(i);
		}
	} int n n m; m Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) n = stdIn.nextInt() n stdIn.nextInt() stdIn.nextInt stdIn m = stdIn.nextInt() m stdIn.nextInt() stdIn.nextInt stdIn int[][] matrixA = new int[n][m]; matrixA new int[n][m] n m for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrixA[i][j] = stdIn.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] = stdIn.nextInt();
			}
		} {
			for(int j = 0; j < m; j++) {
				matrixA[i][j] = stdIn.nextInt();
			}
		} for(int j = 0; j < m; j++) {
				matrixA[i][j] = stdIn.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrixA[i][j] = stdIn.nextInt();
			} {
				matrixA[i][j] = stdIn.nextInt();
			} matrixA[i][j] = stdIn.nextInt() matrixA[i][j] matrixA[i] matrixA i j stdIn.nextInt() stdIn.nextInt stdIn int[] vectorB = new int[m]; vectorB new int[m] m for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vectorB[i] = stdIn.nextInt();
		} {
			vectorB[i] = stdIn.nextInt();
		} vectorB[i] = stdIn.nextInt() vectorB[i] vectorB i stdIn.nextInt() stdIn.nextInt stdIn int[] vectorC = new int[n]; vectorC new int[n] n for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++) {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			}
		} {
			for(int j = 0; j < m; j++) {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			}
		} for(int j = 0; j < m; j++) {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			} {
				vectorC[i] += (matrixA[i][j] * vectorB[j]);
			} vectorC[i] += (matrixA[i][j] * vectorB[j]) vectorC[i] vectorC i (matrixA[i][j] * vectorB[j]) matrixA[i][j] matrixA[i] matrixA i j vectorB[j] vectorB j for(int i : vectorC) {
			System.out.println(i);
		} int i vectorC {
			System.out.println(i);
		} {
			System.out.println(i);
		} System.out.println(i) System.out.println System.out System System.out i String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int n,m;

		Scanner stdIn = new Scanner(System.in);

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

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

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

		int[] vectorB = new int[m];

		for(int i = 0; i < m; i++) {
			vectorB[i] = stdIn.nextInt();
		}

		int[] vectorC = new int[n];

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

		for(int i : vectorC) {
			System.out.println(i);
		}
	}

}