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

public class Main {

    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    }

} 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 NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    }

} Main public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    } main {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int m = Integer.parseInt(input[0]); m Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int n = Integer.parseInt(input[1]); n Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 int[][] matrix = new int[m][n]; matrix new int[m][n] m n int[] num = new int[n]; num new int[n] n for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } {
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                matrix[i][j] = Integer.parseInt(line[j]);
            } {
                matrix[i][j] = Integer.parseInt(line[j]);
            } matrix[i][j] = Integer.parseInt(line[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            num[i] = Integer.parseInt(br.readLine());            ;
        } {
            num[i] = Integer.parseInt(br.readLine());            ;
        } num[i] = Integer.parseInt(br.readLine()) num[i] num i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        } {
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        } int result = 0; result 0 for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
            result += matrix[i][j] * num[j];
            } {
            result += matrix[i][j] * num[j];
            } result += matrix[i][j] * num[j] result matrix[i][j] * num[j] matrix[i][j] matrix[i] matrix i j num[j] num j System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    }

} public class Main {

    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    }

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

public class Main {

    public static void main(String[] args) throws NumberFormatException, IOException {
        // TODO 自動生成されたメソッド・スタブ
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] input = br.readLine().split(" ");
        int m = Integer.parseInt(input[0]);
        int n = Integer.parseInt(input[1]);
        int[][] matrix = new int[m][n];
        int[] num = new int[n];


        for(int i = 0;i < m;i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0;j < n;j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0;i < n;i++){
            num[i] = Integer.parseInt(br.readLine());            ;
        }

        for(int i = 0;i < m;i++){
            int result = 0;
            for(int j = 0;j < n;j++){
            result += matrix[i][j] * num[j];
            }
            System.out.println(result);
        }

    }

}
