import java.util.Scanner;
 
class Main{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
        	int x = sc.nextInt();
		int y = sc.nextInt();
	        int[][]a = new int[x][y];
	        int[]b = new int[y];
	        int[]c = new int [x];

		for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	}
         
        	for(int i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	}
        	for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	}
    	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
        	int x = sc.nextInt();
		int y = sc.nextInt();
	        int[][]a = new int[x][y];
	        int[]b = new int[y];
	        int[]c = new int [x];

		for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	}
         
        	for(int i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	}
        	for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	}
    	}
} Main public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
        	int x = sc.nextInt();
		int y = sc.nextInt();
	        int[][]a = new int[x][y];
	        int[]b = new int[y];
	        int[]c = new int [x];

		for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	}
         
        	for(int i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	}
        	for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	}
    	} main {
		Scanner sc = new Scanner(System.in);
        	int x = sc.nextInt();
		int y = sc.nextInt();
	        int[][]a = new int[x][y];
	        int[]b = new int[y];
	        int[]c = new int [x];

		for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	}
         
        	for(int i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	}
        	for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	}
    	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int[][]a = new int[x][y]; a new int[x][y] x y int[]b = new int[y]; b new int[y] y int[]c = new int [x]; c new int [x] x for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	} int i =0 ; int i =0 ; i 0 i < x i x i++ i++ i {
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	} {
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	} for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		} int j = 0; int j = 0; j 0 j < y j y 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 i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	} int i = 0; int i = 0; i 0 i < y i y i++ i++ i {
            		b[i] = sc.nextInt();
        	} {
            		b[i] = sc.nextInt();
        	} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	} int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	} {
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	} for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		} int j = 0; int j = 0; j 0 j < y j y j++ j++ j {
                		c[i] += a[i][j] * b[j];
            		} {
                		c[i] += a[i][j] * b[j];
            		} c[i] += a[i][j] * b[j] c[i] c i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[]args args
import java.util.Scanner;
 
class Main{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
        	int x = sc.nextInt();
		int y = sc.nextInt();
	        int[][]a = new int[x][y];
	        int[]b = new int[y];
	        int[]c = new int [x];

		for(int i =0 ; i < x; i++){
            		for(int j = 0; j < y; j++){
                		a[i][j] = sc.nextInt();
            		}
        	}
         
        	for(int i = 0; i < y; i++){
            		b[i] = sc.nextInt();
        	}
        	for(int i = 0; i < x; i++){
            		for(int j = 0; j < y; j++){
                		c[i] += a[i][j] * b[j];
            		}
            		System.out.println(c[i]);
        	}
    	}
}