import java.io.*;

public class Main{
    public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    }
} import java.io.*; io.* java public class Main{
    public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    }
} Main public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 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[] result = new int[n]; result new int[n] n for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        } {
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        } String[] str2 = br.readLine().split(" "); str2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            } int k=0; int k=0; k 0 k<m k m k++ k++ k {
                matrix[i][k] = Integer.parseInt(str2[k]);
            } {
                matrix[i][k] = Integer.parseInt(str2[k]);
            } matrix[i][k] = Integer.parseInt(str2[k]) matrix[i][k] matrix[i] matrix i k Integer.parseInt(str2[k]) Integer.parseInt Integer str2[k] str2 k for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            vector[i] = Integer.parseInt(br.readLine());
        } {
            vector[i] = Integer.parseInt(br.readLine());
        } vector[i] = Integer.parseInt(br.readLine()) vector[i] vector i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        } {
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        } for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            } int k=0; int k=0; k 0 k<m k m k++ k++ k {
                result[i] += matrix[i][k] * vector[k];
            } {
                result[i] += matrix[i][k] * vector[k];
            } result[i] += matrix[i][k] * vector[k] result[i] result i matrix[i][k] * vector[k] matrix[i][k] matrix[i] matrix i k vector[k] vector k for(int i=0; i<n; i++){
            System.out.println(result[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            System.out.println(result[i]);
        } {
            System.out.println(result[i]);
        } System.out.println(result[i]) System.out.println System.out System System.out result[i] result i String[]args args public class Main{
    public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    }
} public class Main{
    public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    }
} Main
import java.io.*;

public class Main{
    public static void main(String[]args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();

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

        //??????????????¨???????????????
        for(int i=0; i<n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int k=0; k<m; k++){
                matrix[i][k] = Integer.parseInt(str2[k]);
            }
        }
        for(int i=0; i<m; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }

        //???????????? x ??????
        for(int i=0; i<n; i++){
            for(int k=0; k<m; k++){
                result[i] += matrix[i][k] * vector[k];
            }
        }

        //??????
        for(int i=0; i<n; i++){
            System.out.println(result[i]);
        }

    }
}