import java.io.*;
class Main{
	public static void main(String[]args)throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int i,j;
		String[] nm=br.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		
		int[][] A=new int[n][m];
		int[] b=new int[m];
		int []c=new int[n];
		
		for(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		}
		for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(c[i]);
		}
	}
} import java.io.*; io.* java class Main{
	public static void main(String[]args)throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int i,j;
		String[] nm=br.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		
		int[][] A=new int[n][m];
		int[] b=new int[m];
		int []c=new int[n];
		
		for(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		}
		for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(c[i]);
		}
	}
} Main public static void main(String[]args)throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int i,j;
		String[] nm=br.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		
		int[][] A=new int[n][m];
		int[] b=new int[m];
		int []c=new int[n];
		
		for(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		}
		for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(c[i]);
		}
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int i,j;
		String[] nm=br.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		
		int[][] A=new int[n][m];
		int[] b=new int[m];
		int []c=new int[n];
		
		for(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		}
		for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(c[i]);
		}
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int i i j; j String[] nm=br.readLine().split(" "); nm br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n=Integer.parseInt(nm[0]); n Integer.parseInt(nm[0]) Integer.parseInt Integer nm[0] nm 0 int m=Integer.parseInt(nm[1]); m Integer.parseInt(nm[1]) Integer.parseInt Integer nm[1] nm 1 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(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		} {
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		} String[] numA=br.readLine().split(" "); numA br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				A[i][j]=Integer.parseInt(numA[j]);
			} {
				A[i][j]=Integer.parseInt(numA[j]);
			} A[i][j]=Integer.parseInt(numA[j]) A[i][j] A[i] A i j Integer.parseInt(numA[j]) Integer.parseInt Integer numA[j] numA j for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		} j=0; j=0 j 0 j<m j m j++ j++ j {
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		} {
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		} String numB=br.readLine(); numB br.readLine() br.readLine br b[j]=Integer.parseInt(numB) b[j] b j Integer.parseInt(numB) Integer.parseInt Integer numB for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			} i=0; i=0 i 0 i<n i n i++ i++ i {
				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 for(i=0;i<n;i++){
			System.out.println(c[i]);
		} i=0; i=0 i 0 i<n i n 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
import java.io.*;
class Main{
	public static void main(String[]args)throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int i,j;
		String[] nm=br.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		
		int[][] A=new int[n][m];
		int[] b=new int[m];
		int []c=new int[n];
		
		for(i=0;i<n;i++){
			String[] numA=br.readLine().split(" ");
			for(j=0;j<m;j++){
				A[i][j]=Integer.parseInt(numA[j]);
			}
		}
		for(j=0;j<m;j++){
			String numB=br.readLine();
			b[j]=Integer.parseInt(numB);
			for(i=0;i<n;i++){
				c[i]+=(A[i][j])*(b[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(c[i]);
		}
	}
}