

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

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

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

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

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		}
	} main {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int line = in.nextInt(); line in.nextInt() in.nextInt in int column = in.nextInt(); column in.nextInt() in.nextInt in int[][] matrix = new int[line][column]; matrix new int[line][column] line column int[] vector = new int[column]; vector new int[column] column for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		} int l = 0; int l = 0; l 0 l < line l line l++ l++ l {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		} {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		} for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			} int c = 0; int c = 0; c 0 c < column c column c++ c++ c {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			} {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			} int column_num = in.nextInt(); column_num in.nextInt() in.nextInt in matrix[l][c] = column_num matrix[l][c] matrix[l] matrix l c column_num for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		} int c = 0; int c = 0; c 0 c < column c column c++ c++ c {

			int column_num = in.nextInt();
			vector[c] = column_num;

		} {

			int column_num = in.nextInt();
			vector[c] = column_num;

		} int column_num = in.nextInt(); column_num in.nextInt() in.nextInt in vector[c] = column_num vector[c] vector c column_num for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		} int l = 0; int l = 0; l 0 l < line l line l++ l++ l {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		} {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		} int ans = 0; ans 0 for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			} int c = 0; int c = 0; c 0 c < column c column c++ c++ c {

				ans += matrix[l][c] * vector[c];
			} {

				ans += matrix[l][c] * vector[c];
			} ans += matrix[l][c] * vector[c] ans matrix[l][c] * vector[c] matrix[l][c] matrix[l] matrix l c vector[c] vector c System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		}
	}
} public class Main {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		}
	}
} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int line = in.nextInt();
		int column = in.nextInt();

		// ???????????????????´?????????????
		int[][] matrix = new int[line][column];
		// ????????????????????????????´?????????????
		int[] vector = new int[column];

		for(int l = 0; l < line; l++) {

			for(int c = 0; c < column; c++) {

				int column_num = in.nextInt();
				matrix[l][c] = column_num;

			}
		}

		for(int c = 0; c < column; c++) {

			int column_num = in.nextInt();
			vector[c] = column_num;

		}

		for(int l = 0; l < line; l++) {

			int ans = 0;

			for(int c = 0; c < column; c++) {

				ans += matrix[l][c] * vector[c];
			}

			System.out.println(ans);

		}
	}
}