import java.io.*;
import java.util.*;
public class Main{
	public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
	public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	}
} Main public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	} main {
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	} Scanner cin= new Scanner(System.in); cin new Scanner(System.in) final int m= cin.nextInt(); m cin.nextInt() cin.nextInt cin final int n= cin.nextInt(); n cin.nextInt() cin.nextInt cin int[][] A= new int[m][n]; A new int[m][n] m n int[]   b= new int[n]; b new int[n] n int[]   c= new int[m]; c new int[m] m int i i j; j for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		} {
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		} for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			} j=0; j=0 j 0 j<n j n j++ j++ j {
				A[i][j]= cin.nextInt();
			} {
				A[i][j]= cin.nextInt();
			} A[i][j]= cin.nextInt() A[i][j] A[i] A i j cin.nextInt() cin.nextInt cin for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		} j=0; j=0 j 0 j<n j n j++ j++ j {
			b[j]= cin.nextInt();
		} {
			b[j]= cin.nextInt();
		} b[j]= cin.nextInt() b[j] b j cin.nextInt() cin.nextInt cin int k; k for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		} {
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		} for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			} k=0; k=0 k 0 k<n k n k++ k++ k {
				c[i]+= A[i][k]*b[k];
			} {
				c[i]+= A[i][k]*b[k];
			} c[i]+= A[i][k]*b[k] c[i] c i A[i][k]*b[k] A[i][k] A[i] A i k b[k] b k for(i=0;i<m;i++){
			System.out.println(c[i]);
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String args[] args public class Main{
	public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	}
} public class Main{
	public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	}
} Main
import java.io.*;
import java.util.*;
public class Main{
	public static void main(String args[]) throws Exception{
		Scanner cin= new Scanner(System.in);
		final int m= cin.nextInt();
		final int n= cin.nextInt();
		
		int[][] A= new int[m][n];
		int[]   b= new int[n];
		int[]   c= new int[m];
		
		int i,j;
		for(i=0;i<m;i++){
			for(j=0;j<n;j++){
				A[i][j]= cin.nextInt();
			}
		}
		for(j=0;j<n;j++){
			b[j]= cin.nextInt();
		}
		
		int k;
		for(i=0;i<m;i++){
			for(k=0;k<n;k++){
				c[i]+= A[i][k]*b[k];
			}
		}
		
		for(i=0;i<m;i++){
			System.out.println(c[i]);
		}
	}
}