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

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ss = br.readLine().split(" ");
        int n = Integer.parseInt(ss[0]);
        int m = Integer.parseInt(ss[1]);
        int[][] num1 = new int[n][m];
        int[] num2 = new int[m];
        int a=0;

        for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        }
        for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        }
        for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ss = br.readLine().split(" ");
        int n = Integer.parseInt(ss[0]);
        int m = Integer.parseInt(ss[1]);
        int[][] num1 = new int[n][m];
        int[] num2 = new int[m];
        int a=0;

        for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        }
        for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        }
        for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        }
    }
} Main public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ss = br.readLine().split(" ");
        int n = Integer.parseInt(ss[0]);
        int m = Integer.parseInt(ss[1]);
        int[][] num1 = new int[n][m];
        int[] num2 = new int[m];
        int a=0;

        for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        }
        for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        }
        for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ss = br.readLine().split(" ");
        int n = Integer.parseInt(ss[0]);
        int m = Integer.parseInt(ss[1]);
        int[][] num1 = new int[n][m];
        int[] num2 = new int[m];
        int a=0;

        for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        }
        for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        }
        for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] ss = br.readLine().split(" "); ss br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(ss[0]); n Integer.parseInt(ss[0]) Integer.parseInt Integer ss[0] ss 0 int m = Integer.parseInt(ss[1]); m Integer.parseInt(ss[1]) Integer.parseInt Integer ss[1] ss 1 int[][] num1 = new int[n][m]; num1 new int[n][m] n m int[] num2 = new int[m]; num2 new int[m] m int a=0; a 0 for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        } {
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            } {
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            } num1[i][j] = Integer.parseInt(str[j]) num1[i][j] num1[i] num1 i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        } {
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        } num2[i] = Integer.parseInt(br.readLine()) num2[i] num2 i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        } {
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        } for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	} int j=0; int j=0; j 0 j<m j m j++ j++ j {
        		a += num1[i][j] * num2[j];
        	} {
        		a += num1[i][j] * num2[j];
        	} a += num1[i][j] * num2[j] a num1[i][j] * num2[j] num1[i][j] num1[i] num1 i j num2[j] num2 j System.out.println(a) System.out.println System.out System System.out a a=0 a 0 String args[] args
import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ss = br.readLine().split(" ");
        int n = Integer.parseInt(ss[0]);
        int m = Integer.parseInt(ss[1]);
        int[][] num1 = new int[n][m];
        int[] num2 = new int[m];
        int a=0;

        for(int i=0; i<n; i++){
            String[] str = br.readLine().split(" ");
            for(int j=0; j<m; j++){
                num1[i][j] = Integer.parseInt(str[j]);;
                
                //System.out.print(num1[i][j]);
            }
                //System.out.println("");
        }
        for(int i=0; i<m; i++){
        	num2[i] = Integer.parseInt(br.readLine());
            //System.out.println(num2[i]);
        }
        for(int i=0; i<n; i++){
        	for(int j=0; j<m; j++){
        		a += num1[i][j] * num2[j];
        	}
        	System.out.println(a);
        	a=0;
        }
    }
}