import java.util.Scanner;

public class Main {

	/*
	 * １行目に n と m が空白区切りで与えられます。
	 * 続く n 行に行列 A の要素 aij が空白区切りで与えられます。
	 * 続く m 行にベクトル b
	 * の要素 bi がそれぞれ１行に与えられます。
	 */

	/*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	}

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

	/*
	 * １行目に n と m が空白区切りで与えられます。
	 * 続く n 行に行列 A の要素 aij が空白区切りで与えられます。
	 * 続く m 行にベクトル b
	 * の要素 bi がそれぞれ１行に与えられます。
	 */

	/*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	}

} Main /*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lineArray = line.split("[\\s]+"); lineArray line.split("[\\s]+") line.split line "[\\s]+" int n = Integer.parseInt(lineArray[0]); n Integer.parseInt(lineArray[0]) Integer.parseInt Integer lineArray[0] lineArray 0 int m = Integer.parseInt(lineArray[1]); m Integer.parseInt(lineArray[1]) Integer.parseInt Integer lineArray[1] lineArray 1 int[][] array = new int[n][m]; array new int[n][m] n m int[] vector = new int [m]; vector new int [m] m long[] c = new long[n]; c new long[n] n for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < array[i].length j array[i].length array[i] array i array[i].length j++ j++ j {
				array[i][j] = sc.nextInt();
			} {
				array[i][j] = sc.nextInt();
			} array[i][j] = sc.nextInt() array[i][j] array[i] array i j sc.nextInt() sc.nextInt sc for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < vector.length i vector.length vector vector.length i++ i++ i {
			vector[i] = sc.nextInt();
		} {
			vector[i] = sc.nextInt();
		} vector[i] = sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc sc.close() sc.close sc for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		} {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		} for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			} int j = 0; int j = 0; j 0 j < array[i].length j array[i].length array[i] array i array[i].length j++ j++ j {
				c[i] += array[i][j] * vector[j]; 
			} {
				c[i] += array[i][j] * vector[j]; 
			} c[i] += array[i][j] * vector[j] c[i] c i array[i][j] * vector[j] array[i][j] array[i] array i j vector[j] vector j for (long l : c) {
			System.out.println(l);
		} long l c {
			System.out.println(l);
		} {
			System.out.println(l);
		} System.out.println(l) System.out.println System.out System System.out l String[] args args public class Main {

	/*
	 * １行目に n と m が空白区切りで与えられます。
	 * 続く n 行に行列 A の要素 aij が空白区切りで与えられます。
	 * 続く m 行にベクトル b
	 * の要素 bi がそれぞれ１行に与えられます。
	 */

	/*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	}

} public class Main {

	/*
	 * １行目に n と m が空白区切りで与えられます。
	 * 続く n 行に行列 A の要素 aij が空白区切りで与えられます。
	 * 続く m 行にベクトル b
	 * の要素 bi がそれぞれ１行に与えられます。
	 */

	/*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	/*
	 * １行目に n と m が空白区切りで与えられます。
	 * 続く n 行に行列 A の要素 aij が空白区切りで与えられます。
	 * 続く m 行にベクトル b
	 * の要素 bi がそれぞれ１行に与えられます。
	 */

	/*
	 * ci=?j=1maijbj = ai1b1+ai2b2+...+aimbm
	 */
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		String[] lineArray = line.split("[\\s]+");

		int n = Integer.parseInt(lineArray[0]);
		int m = Integer.parseInt(lineArray[1]);

		int[][] array = new int[n][m];
		int[] vector = new int [m];
		long[] c = new long[n];

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < vector.length; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				c[i] += array[i][j] * vector[j]; 
			}
		}

		for (long l : c) {
			System.out.println(l);
		}

	}

}