import java.util.Scanner;

public class Main {

		static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	}

	private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	}

	private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	}


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

		static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	}

	private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	}

	private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	}


} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	} main {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] A = new int[n][m]; A new int[n][m] n m int[][] b = new int[m][1]; b new int[m][1] m 1 int[][] c = new int[n][1]; c new int[n][1] n 1 A = inputMat(A) A inputMat(A) inputMat A b = inputMat(b) b inputMat(b) inputMat b vec_multi(A, b, c) vec_multi A b c sc.close() sc.close sc String[] args args private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	} inputMat {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	} int[][] mat = new int[a.length][a[0].length]; mat new int[a.length][a[0].length] a.length a a.length a[0].length a[0] a 0 a[0].length for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[0].length; j++) {
				mat[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			for (int j = 0; j < a[0].length; j++) {
				mat[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < a[0].length; j++) {
				mat[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < a[0].length; j++) {
				mat[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < a[0].length j a[0].length a[0] a 0 a[0].length j++ j++ j {
				mat[i][j] = sc.nextInt();
			} {
				mat[i][j] = sc.nextInt();
			} mat[i][j] = sc.nextInt() mat[i][j] mat[i] mat i j sc.nextInt() sc.nextInt sc return mat; mat int[][] a a private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	} vec_multi {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	} for (int i = 0; i < c.length; i++) {
			for (int j = 0; j < a[0].length; j++) {
				c[i][0] += a[i][j] * b[j][0];
			}
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			for (int j = 0; j < a[0].length; j++) {
				c[i][0] += a[i][j] * b[j][0];
			}
		} {
			for (int j = 0; j < a[0].length; j++) {
				c[i][0] += a[i][j] * b[j][0];
			}
		} for (int j = 0; j < a[0].length; j++) {
				c[i][0] += a[i][j] * b[j][0];
			} int j = 0; int j = 0; j 0 j < a[0].length j a[0].length a[0] a 0 a[0].length j++ j++ j {
				c[i][0] += a[i][j] * b[j][0];
			} {
				c[i][0] += a[i][j] * b[j][0];
			} c[i][0] += a[i][j] * b[j][0] c[i][0] c[i] c i 0 a[i][j] * b[j][0] a[i][j] a[i] a i j b[j][0] b[j] b j 0 for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			System.out.println(c[i][0]);
		} {
			System.out.println(c[i][0]);
		} System.out.println(c[i][0]) System.out.println System.out System System.out c[i][0] c[i] c i 0 int[][] a a int[][] b b int[][] c c public class Main {

		static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	}

	private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	}

	private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	}


} public class Main {

		static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	}

	private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	}

	private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	}


} Main
import java.util.Scanner;

public class Main {

		static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[][] b = new int[m][1];
		int[][] c = new int[n][1];

		A = inputMat(A);
		b = inputMat(b);

		vec_multi(A, b, c);
		sc.close();


	}

	private static int[][] inputMat(int[][] a) {
		int[][] mat = new int[a.length][a[0].length];

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

		return mat;
	}

	private static void vec_multi(int[][] a, int[][] b, int[][] c) {

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

		for (int i = 0; i < c.length; i++) {
			System.out.println(c[i][0]);
		}

	}


}

