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

class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[][] matrix1 = new int[n][m];
        int[] matrix2 = new int[m];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        }
        for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        }
        int[] sum = dot(matrix1, matrix2, n, m);
        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

    static int[] dot(int[][] matrix1, int[] matrix2, int n, int m) {
        int[] sum = new int[n];
        Arrays.fill(sum, 0);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        }
        return sum;
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[][] matrix1 = new int[n][m];
        int[] matrix2 = new int[m];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        }
        for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        }
        int[] sum = dot(matrix1, matrix2, n, m);
        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

    static int[] dot(int[][] matrix1, int[] matrix2, int n, int m) {
        int[] sum = new int[n];
        Arrays.fill(sum, 0);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        }
        return sum;
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[][] matrix1 = new int[n][m];
        int[] matrix2 = new int[m];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        }
        for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        }
        int[] sum = dot(matrix1, matrix2, n, m);
        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[][] matrix1 = new int[n][m];
        int[] matrix2 = new int[m];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        }
        for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        }
        int[] sum = dot(matrix1, matrix2, n, m);
        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int m = Integer.parseInt(st.nextToken()); m Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int[][] matrix1 = new int[n][m]; matrix1 new int[n][m] n m int[] matrix2 = new int[m]; matrix2 new int[m] m for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        } {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            } {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            } matrix1[i][j] = Integer.parseInt(st.nextToken()) matrix1[i][j] matrix1[i] matrix1 i j Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            matrix2[i] = Integer.parseInt(br.readLine());
        } {
            matrix2[i] = Integer.parseInt(br.readLine());
        } matrix2[i] = Integer.parseInt(br.readLine()) matrix2[i] matrix2 i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] sum = dot(matrix1, matrix2, n, m); sum dot(matrix1, matrix2, n, m) dot matrix1 matrix2 n m for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(sum[i]);
        } {
            System.out.println(sum[i]);
        } System.out.println(sum[i]) System.out.println System.out System System.out sum[i] sum i String[] args args static int[] dot(int[][] matrix1, int[] matrix2, int n, int m) {
        int[] sum = new int[n];
        Arrays.fill(sum, 0);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        }
        return sum;
    } dot {
        int[] sum = new int[n];
        Arrays.fill(sum, 0);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        }
        return sum;
    } int[] sum = new int[n]; sum new int[n] n Arrays.fill(sum, 0) Arrays.fill Arrays sum 0 for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        } {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        } for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            } {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            } sum[i] += (matrix1[i][j] * matrix2[j]) sum[i] sum i (matrix1[i][j] * matrix2[j]) matrix1[i][j] matrix1[i] matrix1 i j matrix2[j] matrix2 j return sum; sum int[][] matrix1 matrix1 int[] matrix2 matrix2 int n n int m m
import java.io.*;
import java.util.*;

class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int[][] matrix1 = new int[n][m];
        int[] matrix2 = new int[m];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(st.nextToken());
            }
        }
        for (int i = 0; i < m; i++) {
            matrix2[i] = Integer.parseInt(br.readLine());
        }
        int[] sum = dot(matrix1, matrix2, n, m);
        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

    static int[] dot(int[][] matrix1, int[] matrix2, int n, int m) {
        int[] sum = new int[n];
        Arrays.fill(sum, 0);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                sum[i] += (matrix1[i][j] * matrix2[j]);
            }
        }
        return sum;
    }
}