import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	}

}
 import java.util.*; util.* java import java.io.*; io.* java public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	}

} Main public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	} main {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) int n=in.nextInt() n in.nextInt() in.nextInt in m=in.nextInt() m in.nextInt() in.nextInt in A[][]=new int[n][m] A new int[n][m] n m b[]=new int[m]; b new int[m] m for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.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]=in.nextInt();
		} {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		} for(int j=0;j<m;j++)A[i][j]=in.nextInt(); int j=0; int j=0; j 0 j<m j m j++ j++ j A[i][j]=in.nextInt(); A[i][j]=in.nextInt() A[i][j] A[i] A i j in.nextInt() in.nextInt in for(int i=0;i<m;i++)b[i]=in.nextInt(); int i=0; int i=0; i 0 i<m i m i++ i++ i b[i]=in.nextInt(); b[i]=in.nextInt() b[i] b i in.nextInt() in.nextInt in for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		} {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		} int c=0; c 0 for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				c+=A[i][j]*b[j];
			} {
				c+=A[i][j]*b[j];
			} c+=A[i][j]*b[j] c A[i][j]*b[j] A[i][j] A[i] A i j b[j] b j out.println(c) out.println out c out.flush() out.flush out String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	}

} Main
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=in.nextInt(),m=in.nextInt(),A[][]=new int[n][m],b[]=new int[m];
		
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++)A[i][j]=in.nextInt();
		}
		
		for(int i=0;i<m;i++)b[i]=in.nextInt();
		
		for(int i=0;i<n;i++) {
			int c=0;
			for(int j=0;j<m;j++) {
				c+=A[i][j]*b[j];
			}
			out.println(c);
		}
		
		out.flush();
	}

}

