import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num1 = sc.nextInt(); num1 sc.nextInt() sc.nextInt sc int num2 = sc.nextInt(); num2 sc.nextInt() sc.nextInt sc int[][] gyoretu = new int[num1][num2]; gyoretu new int[num1][num2] num1 num2 int[] retu = new int[num2]; retu new int[num2] num2 for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < gyoretu.length i gyoretu.length gyoretu gyoretu.length i++ i++ i {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		} for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < gyoretu[i].length j gyoretu[i].length gyoretu[i] gyoretu i gyoretu[i].length j++ j++ j {
				gyoretu[i][j] = sc.nextInt();
			} {
				gyoretu[i][j] = sc.nextInt();
			} gyoretu[i][j] = sc.nextInt() gyoretu[i][j] gyoretu[i] gyoretu i j sc.nextInt() sc.nextInt sc for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < retu.length i retu.length retu retu.length i++ i++ i {
			retu[i] = sc.nextInt();
		} {
			retu[i] = sc.nextInt();
		} retu[i] = sc.nextInt() retu[i] retu i sc.nextInt() sc.nextInt sc int[] ans = new int[num1]; ans new int[num1] num1 for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		} int i = 0; int i = 0; i 0 i < gyoretu.length i gyoretu.length gyoretu gyoretu.length i++ i++ i {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		} {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		} ans[i] = 0 ans[i] ans i 0 for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			} int j = 0; int j = 0; j 0 j < gyoretu[i].length j gyoretu[i].length gyoretu[i] gyoretu i gyoretu[i].length j++ j++ j {

				ans[i] += gyoretu[i][j] * retu[j];

			} {

				ans[i] += gyoretu[i][j] * retu[j];

			} ans[i] += gyoretu[i][j] * retu[j] ans[i] ans i gyoretu[i][j] * retu[j] gyoretu[i][j] gyoretu[i] gyoretu i j retu[j] retu j for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		} int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length i++ i++ i {
			System.out.println(ans[i]);
		} {
			System.out.println(ans[i]);
		} System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

		for(int i = 0;i < ans.length;i++) {
			System.out.println(ans[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		int[][] gyoretu = new int[num1][num2];
		int[] retu = new int[num2];

		for(int i = 0;i < gyoretu.length; i++ ) {
			for(int j = 0;j < gyoretu[i].length;j++) {
				gyoretu[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < retu.length ;i++) {
			retu[i] = sc.nextInt();
		}
		int[] ans = new int[num1];
		for(int i = 0; i < gyoretu.length; i++ ) {
			ans[i] = 0;
			for(int j = 0;j < gyoretu[i].length;j++) {

				ans[i] += gyoretu[i][j] * retu[j];

			}
		}

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