import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        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];
        for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        }
        for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        }
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        }
        System.out.print(sb);
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        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];
        for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        }
        for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        }
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        }
        System.out.print(sb);
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        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];
        for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        }
        for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        }
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        }
        System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        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];
        for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        }
        for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        }
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        }
        System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) 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 for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        } {
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        } String[] aa=br.readLine().split(" "); aa br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]); int j=0; int j=0; j 0 j<m j m j++ j++ j a[i][j]=Integer.parseInt(aa[j]); a[i][j]=Integer.parseInt(aa[j]) a[i][j] a[i] a i j Integer.parseInt(aa[j]) Integer.parseInt Integer aa[j] aa j for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
        	b[i]=Integer.parseInt(br.readLine());
        } {
        	b[i]=Integer.parseInt(br.readLine());
        } b[i]=Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br StringBuilder sb=new StringBuilder(); sb new StringBuilder() for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        } 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];
        	sb.append(c+"\n");
        } {
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        } 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] a[i][j] a[i] a i j b[j] b j sb.append(c+"\n") sb.append sb c+"\n" c "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        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];
        for(int i=0;i<n;i++){
        	String[] aa=br.readLine().split(" ");
            for(int j=0;j<m;j++) a[i][j]=Integer.parseInt(aa[j]);
        }
        for(int i=0;i<m;i++){
        	b[i]=Integer.parseInt(br.readLine());
        }
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++){
        	int c=0;
        	for(int j=0;j<m;j++) c+=a[i][j]*b[j];
        	sb.append(c+"\n");
        }
        System.out.print(sb);
	}
}