
import java.util.Scanner;

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

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int intN = sc.nextInt();
		int intM = sc.nextInt();

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int intN = sc.nextInt();
		int intM = sc.nextInt();

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	} main {
		Scanner sc = new Scanner(System.in);
		int intN = sc.nextInt();
		int intM = sc.nextInt();

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int intN = sc.nextInt(); intN sc.nextInt() sc.nextInt sc int intM = sc.nextInt(); intM sc.nextInt() sc.nextInt sc int[][] arrayA = new int[intN][intM]; arrayA new int[intN][intM] intN intM int[] arrayB = new int[intM]; arrayB new int[intM] intM int[] arrayAns = new int[intN]; arrayAns new int[intN] intN for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < intN i intN i++ i++ i {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < intM j intM j++ j++ j {
				arrayA[i][j] = sc.nextInt();
			} {
				arrayA[i][j] = sc.nextInt();
			} arrayA[i][j] = sc.nextInt() arrayA[i][j] arrayA[i] arrayA i j sc.nextInt() sc.nextInt sc for(int i = 0; i < intM; i++) {
			arrayB[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < intM i intM i++ i++ i {
			arrayB[i] = sc.nextInt();
		} {
			arrayB[i] = sc.nextInt();
		} arrayB[i] = sc.nextInt() arrayB[i] arrayB i sc.nextInt() sc.nextInt sc int x = 0; x 0 int y = 0; y 0 for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		} int i = 0; int i = 0; i 0 i < intN i intN i++ i++ i {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		} {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		} for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			} int j = 0; int j = 0; j 0 j < intM j intM j++ j++ j {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			} {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			} y = arrayA[i][j] * arrayB[j] y arrayA[i][j] * arrayB[j] arrayA[i][j] arrayA[i] arrayA i j arrayB[j] arrayB j x = x + y x x + y x y arrayAns[i] = x arrayAns[i] arrayAns i x System.out.println(arrayAns[i]) System.out.println System.out System System.out arrayAns[i] arrayAns i y = 0 y 0 x = 0 x 0 String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int intN = sc.nextInt();
		int intM = sc.nextInt();

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int intN = sc.nextInt();
		int intM = sc.nextInt();

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	}
} Main

import java.util.Scanner;

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

		int[][] arrayA = new int[intN][intM];
		int[] arrayB = new int[intM];
		int[] arrayAns = new int[intN];

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				arrayA[i][j] = sc.nextInt();
			}
		}

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


		int x = 0;
		int y = 0;
		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				y = arrayA[i][j] * arrayB[j];
				x = x + y;
			}

			arrayAns[i] = x;
			System.out.println(arrayAns[i]);
			y = 0;
			x = 0;
		}
/*

		for(int i = 0; i < intN; i++) {
			for(int j = 0; j < intM; j++) {
				System.out.print("arrayA["+i+"]["+j+"] = "+arrayA[i][j]+" ");
			}
			System.out.println("");
		}

		for(int i = 0; i < intM; i++) {
			System.out.println("arrayB["+i+"] = "+arrayB[i]);
		}
*/
	}
}