import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class Main{
	public static void main(String[] args) throws IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java import java.math.*; math.* java public class Main{
	public static void main(String[] args) throws IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	}
} Main public static void main(String[] args) throws IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	} main {
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n=stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m=stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn 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(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.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]=stdIn.nextInt();
		} {
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		} for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt(); int j=0; int j=0; j 0 j<m j m j++ j++ j a[i][j]=stdIn.nextInt(); a[i][j]=stdIn.nextInt() a[i][j] a[i] a i j stdIn.nextInt() stdIn.nextInt stdIn for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt(); int i=0; int i=0; i 0 i<m i m i++ i++ i b[i]=stdIn.nextInt(); b[i]=stdIn.nextInt() b[i] b i stdIn.nextInt() stdIn.nextInt stdIn for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		} {
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		} for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j]; int j=0; int j=0; j 0 j<m j m j++ j++ 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(int i=0;i<n;i++)
			System.out.println(c[i]); int i=0; int i=0; i 0 i<n i n i++ i++ 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 IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	}
} Main
import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class Main{
	public static void main(String[] args) throws IOException{
		Scanner stdIn=new Scanner(System.in);
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=stdIn.nextInt();
		int m=stdIn.nextInt();
		int a[][]=new int[n][m];
		int b[]=new int[m];
		int c[]=new int[n];
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				a[i][j]=stdIn.nextInt();
		}
		for(int i=0;i<m;i++)
			b[i]=stdIn.nextInt();
		for(int i=0;i<n;i++){
			for(int j=0;j<m;j++)
				c[i]+=a[i][j]*b[j];
		}
		for(int i=0;i<n;i++)
			System.out.println(c[i]);
	}
}