
import java.util.Scanner;

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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	}
	

}
 import java.util.Scanner; Scanner 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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	}
	

} 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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	} 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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	} 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 int C[]= new int [n]; C new int [n] n for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 } int i =0; int i =0; i 0 i<n i n i++ i++ i {
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 } {
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 } for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 } int j =0; int j =0; j 0 j<m j m j++ j++ j {
				 int a = sc.nextInt();
				 A[i][j]=a;
				 } {
				 int a = sc.nextInt();
				 A[i][j]=a;
				 } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc A[i][j]=a A[i][j] A[i] A i j a for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 } int k =0; int k =0; k 0 k<m k m k++ k++ k {
					 int b = sc.nextInt();
					 B[k]=b;
					 } {
					 int b = sc.nextInt();
					 B[k]=b;
					 } int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc B[k]=b B[k] B k b for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			} int g=0; int g=0; g 0 g<n g n g++ g++ g {
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			} {
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			} for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 } int l=0; int l=0; l 0 l<m l m l++ l++ l {
				 C[g]=C[g]+A[g][l]*B[l];
			 } {
				 C[g]=C[g]+A[g][l]*B[l];
			 } C[g]=C[g]+A[g][l]*B[l] C[g] C g C[g]+A[g][l]*B[l] C[g] C g A[g][l]*B[l] A[g][l] A[g] A g l B[l] B l System.out.println(C[g]) System.out.println System.out System System.out C[g] C g 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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	}
	

} 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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	}
	

} Main

import java.util.Scanner;

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];
		 int C[]= new int [n];

			 for(int i =0;i<n;i++){
				 for(int j =0;j<m;j++){
				 int a = sc.nextInt();
				 A[i][j]=a;
				 }
			 }
				 for(int k =0;k<m;k++){
					 int b = sc.nextInt();
					 B[k]=b;
					 }
				 
			for(int g=0;g<n;g++){
			 for(int l=0;l<m;l++){
				 C[g]=C[g]+A[g][l]*B[l];
			 }
			 System.out.println(C[g]);
			}
			
		 
		//System.out.println("");
	}
	

}

