import java.io.*;

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