import java.util.Scanner;

class Main{
     public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int m = scan.nextInt();
    	
    	int[][] Vec_a = new int[n][m];
    	int[] Vec_b = new int[m];
    	int[] c = new int[n];

    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	}
    	
    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	}
    }
    	
} import java.util.Scanner; Scanner java.util class Main{
     public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int m = scan.nextInt();
    	
    	int[][] Vec_a = new int[n][m];
    	int[] Vec_b = new int[m];
    	int[] c = new int[n];

    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	}
    	
    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	}
    }
    	
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int m = scan.nextInt();
    	
    	int[][] Vec_a = new int[n][m];
    	int[] Vec_b = new int[m];
    	int[] c = new int[n];

    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	}
    	
    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	}
    } main {
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int m = scan.nextInt();
    	
    	int[][] Vec_a = new int[n][m];
    	int[] Vec_b = new int[m];
    	int[] c = new int[n];

    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	}
    	
    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int[][] Vec_a = new int[n][m]; Vec_a new int[n][m] n m int[] Vec_b = new int[m]; Vec_b new int[m] m int[] c = new int[n]; c new int[n] n for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	} {
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	} for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        		Vec_a[j][i] = scan.nextInt();
        	} {
        		Vec_a[j][i] = scan.nextInt();
        	} Vec_a[j][i] = scan.nextInt() Vec_a[j][i] Vec_a[j] Vec_a j i scan.nextInt() scan.nextInt scan for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
    		Vec_b[i] = scan.nextInt();
    	} {
    		Vec_b[i] = scan.nextInt();
    	} Vec_b[i] = scan.nextInt() Vec_b[i] Vec_b i scan.nextInt() scan.nextInt scan for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	} {
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	} for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	} {
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	} c[j] += Vec_a[j][i] * Vec_b[i] c[j] c j Vec_a[j][i] * Vec_b[i] Vec_a[j][i] Vec_a[j] Vec_a j i Vec_b[i] Vec_b i System.out.println(c[j]) System.out.println System.out System System.out c[j] c j String[] args args
import java.util.Scanner;

class Main{
     public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int m = scan.nextInt();
    	
    	int[][] Vec_a = new int[n][m];
    	int[] Vec_b = new int[m];
    	int[] c = new int[n];

    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		Vec_a[j][i] = scan.nextInt();
        	}
    	}
    	
    	for(int i = 0; i < m; i++){
    		Vec_b[i] = scan.nextInt();
    	}
    	
    	for(int j = 0; j < n; j++){
    		for(int i = 0; i < m; i++){
        		c[j] += Vec_a[j][i] * Vec_b[i]; 
        	}
    		System.out.println(c[j]);
    	}
    }
    	
}