import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		} {
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		} for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			} {
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			} int number1 = sc.nextInt(); number1 sc.nextInt() sc.nextInt sc A[i][j] = number1 A[i][j] A[i] A i j number1 for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int number2 = sc.nextInt();
			b[i] = number2;
		} {
			int number2 = sc.nextInt();
			b[i] = number2;
		} int number2 = sc.nextInt(); number2 sc.nextInt() sc.nextInt sc b[i] = number2 b[i] b i number2 int result; result for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		} {
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		} result=0 result 0 for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				result += A[i][j] * b[j];
			} {
				result += A[i][j] * b[j];
			} result += A[i][j] * b[j] result A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j System.out.printf("%d\n",result) System.out.printf System.out System System.out "%d\n" result String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int number1 = sc.nextInt();
				 A[i][j] = number1;
			}
		}

		for(int i=0;i<m;i++){
			int number2 = sc.nextInt();
			b[i] = number2;
		}
		int result;
		for(int i = 0;i<n; i++){
		    result=0;
			for(int j = 0; j<m; j++){
				result += A[i][j] * b[j];
			}
		 System.out.printf("%d\n",result);
		}
	
	}
}
