import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(), m = scanner.nextInt();
		int[][] matrix = new int[n][m];
		int[] vector = new int[n];

		for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		}

		for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(vector[i]);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(), m = scanner.nextInt();
		int[][] matrix = new int[n][m];
		int[] vector = new int[n];

		for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		}

		for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(vector[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(), m = scanner.nextInt();
		int[][] matrix = new int[n][m];
		int[] vector = new int[n];

		for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		}

		for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(vector[i]);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(), m = scanner.nextInt();
		int[][] matrix = new int[n][m];
		int[] vector = new int[n];

		for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		}

		for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(vector[i]);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vector = new int[n]; vector new int[n] n for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		} {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		} for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			} int i2 = 0; int i2 = 0; i2 0 i2 < m i2 m i2++ i2++ i2 {
				matrix[i][i2] = scanner.nextInt();
			} {
				matrix[i][i2] = scanner.nextInt();
			} matrix[i][i2] = scanner.nextInt() matrix[i][i2] matrix[i] matrix i i2 scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		} {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		} int number = scanner.nextInt(); number scanner.nextInt() scanner.nextInt scanner for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			} int i2 = 0; int i2 = 0; i2 0 i2 < n i2 n i2++ i2++ i2 {
				vector[i2] += matrix[i2][i] * number;
			} {
				vector[i2] += matrix[i2][i] * number;
			} vector[i2] += matrix[i2][i] * number vector[i2] vector i2 matrix[i2][i] * number matrix[i2][i] matrix[i2] matrix i2 i number for (int i = 0; i < n; i++) {
			System.out.println(vector[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(vector[i]);
		} {
			System.out.println(vector[i]);
		} System.out.println(vector[i]) System.out.println System.out System System.out vector[i] vector i String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(), m = scanner.nextInt();
		int[][] matrix = new int[n][m];
		int[] vector = new int[n];

		for (int i = 0; i < n; i++) {
			for (int i2 = 0; i2 < m; i2++) {
				matrix[i][i2] = scanner.nextInt();
			}
		}

		for (int i = 0; i < m; i++) {
			int number = scanner.nextInt();

			for (int i2 = 0; i2 < n; i2++) {
				vector[i2] += matrix[i2][i] * number;
			}
		}

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