import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150
} Main public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150 main {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	} BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String first_line = input.readLine(); first_line input.readLine() input.readLine input String[] array_of_li_col = first_line.split(" "); array_of_li_col first_line.split(" ") first_line.split first_line " " int line = Integer.parseInt(array_of_li_col[0]); line Integer.parseInt(array_of_li_col[0]) Integer.parseInt Integer array_of_li_col[0] array_of_li_col 0 int column = Integer.parseInt(array_of_li_col[1]); column Integer.parseInt(array_of_li_col[1]) Integer.parseInt Integer array_of_li_col[1] array_of_li_col 1 int matrix_array_A[][] = new int[line][column]; matrix_array_A new int[line][column] line column int vector_array_b[] = new int[column]; vector_array_b new int[column] column for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		} int line_A = 0; int line_A = 0; line_A 0 line_A < line line_A line line_A++ line_A++ line_A {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		} {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		} String elements_A = input.readLine(); elements_A input.readLine() input.readLine input String[] elements_A_array = elements_A.split(" "); elements_A_array elements_A.split(" ") elements_A.split elements_A " " for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			} int column_A = 0; int column_A = 0; column_A 0 column_A < column column_A column column_A++ column_A++ column_A {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			} {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			} int elements_A_num = Integer.parseInt(elements_A_array[column_A]); elements_A_num Integer.parseInt(elements_A_array[column_A]) Integer.parseInt Integer elements_A_array[column_A] elements_A_array column_A matrix_array_A[line_A][column_A] = elements_A_num matrix_array_A[line_A][column_A] matrix_array_A[line_A] matrix_array_A line_A column_A elements_A_num for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		} int column_b = 0; int column_b = 0; column_b 0 column_b < column column_b column column_b++ column_b++ column_b {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		} {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		} String elements_b = input.readLine(); elements_b input.readLine() input.readLine input int elements_b_num = Integer.parseInt(elements_b); elements_b_num Integer.parseInt(elements_b) Integer.parseInt Integer elements_b vector_array_b[column_b] = elements_b_num vector_array_b[column_b] vector_array_b column_b elements_b_num int elements_Ci = 0; elements_Ci 0 for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		} int line_A = 0; int line_A = 0; line_A 0 line_A < line line_A line line_A++ line_A++ line_A {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		} {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		} for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			} int column_A = 0; int column_A = 0; column_A 0 column_A < column column_A column column_A++ column_A++ column_A {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			} {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			} elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A] elements_Ci matrix_array_A[line_A][column_A] * vector_array_b[column_A] matrix_array_A[line_A][column_A] matrix_array_A[line_A] matrix_array_A line_A column_A vector_array_b[column_A] vector_array_b column_A System.out.println(elements_Ci) System.out.println System.out System System.out elements_Ci elements_Ci = 0 elements_Ci 0 String[] args args public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150
} public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();
		// ?????°??¨?????°?????????
		String[] array_of_li_col = first_line.split(" ");
		// ?????°
		int line = Integer.parseInt(array_of_li_col[0]);
		// ?????°
		int column = Integer.parseInt(array_of_li_col[1]);
		// ??????A???????¬??????????
		int matrix_array_A[][] = new int[line][column];
		// ????????????????????????
		int vector_array_b[] = new int[column];

		// ??????A??????????????°?????°?????????
		for (int line_A = 0; line_A < line; line_A++) {
			String elements_A = input.readLine();
			String[] elements_A_array = elements_A.split(" ");
			for (int column_A = 0; column_A < column; column_A++) {
				// ??\??????????????????A???????´?
				int elements_A_num = Integer.parseInt(elements_A_array[column_A]);
				// ??????A???????¬???????????????\????????????????´????????´?
				matrix_array_A[line_A][column_A] = elements_A_num;
			}

		}
		// ???????????\????????????column?????°??°?????????
		for (int column_b = 0; column_b < column; column_b++) {
			String elements_b = input.readLine();
			int elements_b_num = Integer.parseInt(elements_b);
			// ??????????????????b?????\??????????????°??????????´?
			vector_array_b[column_b] = elements_b_num;
		}
		// ????´?Ci
		int elements_Ci = 0;
		for (int line_A = 0; line_A < line; line_A++) {
			for (int column_A = 0; column_A < column; column_A++) {
				elements_Ci += matrix_array_A[line_A][column_A] * vector_array_b[column_A];
			}
			System.out.println(elements_Ci);
			elements_Ci = 0;
		}

	}//150
}