import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	}

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

	public static void main(String[] args) {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	}

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

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	} main {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	} int[][] boxN; boxN int[] boxM; boxM int[] InputList = new int[2]; InputList new int[2] 2 int anser = 0; anser 0 Scanner sc = null; sc null try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		} {
			sc.close();
		} sc.close() sc.close sc {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} sc = new Scanner(System.in) sc new Scanner(System.in) for (int i = 0; i < InputList.length; i++) {
				InputList[i] = sc.nextInt();
			} int i = 0; int i = 0; i 0 i < InputList.length i InputList.length InputList InputList.length i++ i++ i {
				InputList[i] = sc.nextInt();
			} {
				InputList[i] = sc.nextInt();
			} InputList[i] = sc.nextInt() InputList[i] InputList i sc.nextInt() sc.nextInt sc boxN = new int[InputList[0]][InputList[1]] boxN new int[InputList[0]][InputList[1]] InputList[0] InputList 0 InputList[1] InputList 1 for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			} int i = 0; int i = 0; i 0 i < InputList[0] i InputList[0] InputList 0 i++ i++ i {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			} {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			} for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				} int j = 0; int j = 0; j 0 j < InputList[1] j InputList[1] InputList 1 j++ j++ j {

					boxN[i][j] = sc.nextInt();
				} {

					boxN[i][j] = sc.nextInt();
				} boxN[i][j] = sc.nextInt() boxN[i][j] boxN[i] boxN i j sc.nextInt() sc.nextInt sc boxM = new int[InputList[1]] boxM new int[InputList[1]] InputList[1] InputList 1 for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			} int i = 0; int i = 0; i 0 i < InputList[1] i InputList[1] InputList 1 i++ i++ i {
				boxM[i] = sc.nextInt();
			} {
				boxM[i] = sc.nextInt();
			} boxM[i] = sc.nextInt() boxM[i] boxM i sc.nextInt() sc.nextInt sc for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			} int i = 0; int i = 0; i 0 i < InputList[0] i InputList[0] InputList 0 i++ i++ i {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			} {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			} for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				} int j = 0; int j = 0; j 0 j < InputList[1] j InputList[1] InputList 1 j++ j++ j {

					anser += boxN[i][j] * boxM[j];
				} {

					anser += boxN[i][j] * boxM[j];
				} anser += boxN[i][j] * boxM[j] anser boxN[i][j] * boxM[j] boxN[i][j] boxN[i] boxN i j boxM[j] boxM j System.out.println(anser) System.out.println System.out System System.out anser anser = 0 anser 0 String[] args args public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	}

} public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int[][] boxN;
		int[] boxM;
		int[] InputList = new int[2];

		int anser = 0;

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

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

			//??????N?????????
			boxN = new int[InputList[0]][InputList[1]];

			for (int i = 0; i < InputList[0]; i++) {

				//N??????????????????
				for (int j = 0; j < InputList[1]; j++) {

					boxN[i][j] = sc.nextInt();
				}
			}

			//??????M?????????
			boxM = new int[InputList[1]];

			for (int i = 0; i < InputList[1]; i++) {
				boxM[i] = sc.nextInt();
			}

			//?¨????
			for (int i = 0; i < InputList[0]; i++) {
				for (int j = 0; j < InputList[1]; j++) {

					anser += boxN[i][j] * boxM[j];
				}
				//???????????????
				System.out.println(anser);
				//????????????
				anser = 0;
			}
		} finally {
			sc.close();
		}

	}

}