
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    }
} Main public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    } main {
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    } BufferedReader reader = new BufferedReader (new InputStreamReader(System.in)); reader new BufferedReader (new InputStreamReader(System.in)) String line = reader.readLine(); line reader.readLine() reader.readLine reader String[] columns = new String[1000]; columns new String[1000] 1000 columns = line.split(" ") columns line.split(" ") line.split line " " int n = Integer.parseInt(columns[0]); n Integer.parseInt(columns[0]) Integer.parseInt Integer columns[0] columns 0 int m = Integer.parseInt(columns[1]); m Integer.parseInt(columns[1]) Integer.parseInt Integer columns[1] columns 1 int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vector = new int[m]; vector new int[m] m int [] sum =new int[n]; sum new int[n] n for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        } int y = 0; int y = 0; y 0 y < n y n y++ y++ y {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        } {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        } line = reader.readLine() line reader.readLine() reader.readLine reader columns = line.split(" ") columns line.split(" ") line.split line " " for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            } int x = 0 ; int x = 0 ; x 0 x < m x m x++ x++ x {
                matrix[y][x] = Integer.parseInt(columns[x]);
            } {
                matrix[y][x] = Integer.parseInt(columns[x]);
            } matrix[y][x] = Integer.parseInt(columns[x]) matrix[y][x] matrix[y] matrix y x Integer.parseInt(columns[x]) Integer.parseInt Integer columns[x] columns x for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        } int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        } {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        } line = reader.readLine() line reader.readLine() reader.readLine reader vector[x] = Integer.parseInt(line) vector[x] vector x Integer.parseInt(line) Integer.parseInt Integer line for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        } int y = 0; int y = 0; y 0 y < n y n y++ y++ y {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        } {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        } sum[y] = 0 sum[y] sum y 0 for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            } int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
                sum[y] += (vector[x] * matrix[y][x]);
            } {
                sum[y] += (vector[x] * matrix[y][x]);
            } sum[y] += (vector[x] * matrix[y][x]) sum[y] sum y (vector[x] * matrix[y][x]) vector[x] vector x matrix[y][x] matrix[y] matrix y x System.out.println(sum[y]) System.out.println System.out System System.out sum[y] sum y String[] args args public class Main {
    public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    }
} public class Main {
    public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    }
} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main (String[] args ) throws IOException{
        BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
        
        String line = reader.readLine();
        String[] columns = new String[1000];
        columns = line.split(" ");
        int n = Integer.parseInt(columns[0]); // 3
        int m = Integer.parseInt(columns[1]); // 4
        int[][] matrix = new int[n][m];
        int[] vector = new int[m];   // 4
        int [] sum =new int[n]; // 3
        
        for (int y = 0; y < n; y++) {
            line = reader.readLine();
            columns = line.split(" ");
            for ( int x = 0 ; x < m; x++ ) {
                matrix[y][x] = Integer.parseInt(columns[x]);
            }
        }
        for (int x = 0; x < m; x++) {
            line = reader.readLine();
            vector[x] = Integer.parseInt(line);
        }
        for (int y = 0; y < n ; y++) {
            sum[y] = 0;
            for (int x = 0; x < m ; x++ ) {
                sum[y] += (vector[x] * matrix[y][x]);
            }
            System.out.println(sum[y]);
        }
    }
}