//b棟f階のr番目の部屋にv人が追加で入居したことを示します。vが負の値の場合、v人退去したことを示します。 

import java.util.Scanner;

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];
        
      //Aの配列にforとscanner使って代入
        for(int i = 0 ; i < n ; i++ ){
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        }
        
      //bの配列にforとscanner使って代入
        for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        }
        
        //計算作業
        
        int x,y;
        int sum;
        
        for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        }
    }
} import java.util.Scanner; Scanner java.util 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];
        
      //Aの配列にforとscanner使って代入
        for(int i = 0 ; i < n ; i++ ){
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        }
        
      //bの配列にforとscanner使って代入
        for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        }
        
        //計算作業
        
        int x,y;
        int sum;
        
        for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        }
    }
} 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];
        
      //Aの配列にforとscanner使って代入
        for(int i = 0 ; i < n ; i++ ){
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        }
        
      //bの配列にforとscanner使って代入
        for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        }
        
        //計算作業
        
        int x,y;
        int sum;
        
        for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        }
    } 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];
        
      //Aの配列にforとscanner使って代入
        for(int i = 0 ; i < n ; i++ ){
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        }
        
      //bの配列にforとscanner使って代入
        for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        }
        
        //計算作業
        
        int x,y;
        int sum;
        
        for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        }
    } 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++ ){
        		A[i][j] = sc.nextInt();
        	}
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        } {
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        } for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	} int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
        		A[i][j] = sc.nextInt();
        	} {
        		A[i][j] = sc.nextInt();
        	} A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        } int k = 0 ; int k = 0 ; k 0 k < m k m k++ k++ k {
        	b[k] = sc.nextInt();
        } {
        	b[k] = sc.nextInt();
        } b[k] = sc.nextInt() b[k] b k sc.nextInt() sc.nextInt sc int x x y; y int sum; sum for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        } x = 0 ; x = 0 x 0 x < n x n x++ x++ x {
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        } {
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        } sum = 0 sum 0 for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	} y = 0 ; y = 0 y 0 y < m y m y++ y++ y {
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	} {
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	} sum = sum + A[x][y] * b[y] sum sum + A[x][y] * b[y] sum A[x][y] * b[y] A[x][y] A[x] A x y b[y] b y System.out.println(sum) System.out.println System.out System System.out sum String [] args args
//b棟f階のr番目の部屋にv人が追加で入居したことを示します。vが負の値の場合、v人退去したことを示します。 

import java.util.Scanner;

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];
        
      //Aの配列にforとscanner使って代入
        for(int i = 0 ; i < n ; i++ ){
        	for(int j = 0 ; j < m ; j++ ){
        		A[i][j] = sc.nextInt();
        	}
        }
        
      //bの配列にforとscanner使って代入
        for(int k = 0 ; k < m ; k++ ){
        	b[k] = sc.nextInt();
        }
        
        //計算作業
        
        int x,y;
        int sum;
        
        for( x = 0 ; x < n ; x++ ){
        	sum = 0;
        	for(y = 0 ; y < m ; y++ ){
        		
        		
        		sum = sum + A[x][y] * b[y];
        		
        	}
        System.out.println(sum);
        }
    }
}