import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

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

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line1 = sc.nextLine(); line1 sc.nextLine() sc.nextLine sc String[] string1 = line1.split(" "); string1 line1.split(" ") line1.split line1 " " int n = Integer.parseInt(string1[0]); n Integer.parseInt(string1[0]) Integer.parseInt Integer string1[0] string1 0 int m = Integer.parseInt(string1[1]); m Integer.parseInt(string1[1]) Integer.parseInt Integer string1[1] string1 1 String[][] gyouA = new String[n][m]; gyouA new String[n][m] n m int[][] A = new int[n][m]; A new int[n][m] n m for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		} {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		} String line2 = sc.nextLine(); line2 sc.nextLine() sc.nextLine sc for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			} {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			} String[] string = line2.split(" "); string line2.split(" ") line2.split line2 " " gyouA[i][j] = string[j] gyouA[i][j] gyouA[i] gyouA i j string[j] string j A[i][j] = Integer.parseInt(gyouA[i][j]) A[i][j] A[i] A i j Integer.parseInt(gyouA[i][j]) Integer.parseInt Integer gyouA[i][j] gyouA[i] gyouA i j String[] retB = new String[m]; retB new String[m] m int[] B = new int[retB.length]; B new int[retB.length] retB.length retB retB.length for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		} {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		} String line3 = sc.nextLine(); line3 sc.nextLine() sc.nextLine sc retB[i] = line3 retB[i] retB i line3 B[i] = Integer.parseInt(retB[i]) B[i] B i Integer.parseInt(retB[i]) Integer.parseInt Integer retB[i] retB i int AB = 0; AB 0 for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		} {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		} int C = 0; C 0 for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
				AB = A[j][k] * B[k];
				C += AB;
			} {
				AB = A[j][k] * B[k];
				C += AB;
			} AB = A[j][k] * B[k] AB A[j][k] * B[k] A[j][k] A[j] A j k B[k] B k C += AB C AB System.out.println(C) System.out.println System.out System System.out C String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String[] string1 = line1.split(" ");
		int n = Integer.parseInt(string1[0]);
		int m = Integer.parseInt(string1[1]);

		String[][] gyouA = new String[n][m];
		int[][] A = new int[n][m];
		for (int i = 0; i < n; i++) {
			String line2 = sc.nextLine();
			for (int j = 0; j < m; j++) {
				String[] string = line2.split(" ");
				gyouA[i][j] = string[j];
				A[i][j] = Integer.parseInt(gyouA[i][j]);
			}

		}

		String[] retB = new String[m];
		int[] B = new int[retB.length];
		for (int i = 0; i < m; i++) {
			String line3 = sc.nextLine();
			retB[i] = line3;
			B[i] = Integer.parseInt(retB[i]);
		}

		int AB = 0;
		for (int j = 0; j < n; j++) {
			int C = 0;
			for (int k = 0; k < m; k++) {
				AB = A[j][k] * B[k];
				C += AB;
			}
			System.out.println(C);
		}

	}
}