import java.io.*;

class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        int n, m;
        String[] str;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        str = br.readLine().split(" ");
        n = Integer.parseInt(str[0]);
        m = Integer.parseInt(str[1]);

        int[][] arr = new int[n][m];
        int[] vec = new int[m];
        int[] ans = new int[n];

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

        for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        }

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        }

        for(int num : ans){
            System.out.println(num);
        }
    }
} import java.io.*; io.* java class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        int n, m;
        String[] str;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        str = br.readLine().split(" ");
        n = Integer.parseInt(str[0]);
        m = Integer.parseInt(str[1]);

        int[][] arr = new int[n][m];
        int[] vec = new int[m];
        int[] ans = new int[n];

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

        for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        }

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        }

        for(int num : ans){
            System.out.println(num);
        }
    }
} Main public static void main(String[] args) throws NumberFormatException, IOException {
        int n, m;
        String[] str;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        str = br.readLine().split(" ");
        n = Integer.parseInt(str[0]);
        m = Integer.parseInt(str[1]);

        int[][] arr = new int[n][m];
        int[] vec = new int[m];
        int[] ans = new int[n];

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

        for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        }

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        }

        for(int num : ans){
            System.out.println(num);
        }
    } main {
        int n, m;
        String[] str;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        str = br.readLine().split(" ");
        n = Integer.parseInt(str[0]);
        m = Integer.parseInt(str[1]);

        int[][] arr = new int[n][m];
        int[] vec = new int[m];
        int[] ans = new int[n];

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

        for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        }

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        }

        for(int num : ans){
            System.out.println(num);
        }
    } int n n m; m String[] str; str BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " n = Integer.parseInt(str[0]) n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 m = Integer.parseInt(str[1]) m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int[][] arr = new int[n][m]; arr new int[n][m] n m int[] vec = new int[m]; vec new int[m] m int[] ans = new int[n]; ans new int[n] n for(int i = 0; i < n; i++){
            String[] str2 = br.readLine().split(" ");
            for(int j = 0; j < m; j++){
                arr[i][j] = Integer.parseInt(str2[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String[] str2 = br.readLine().split(" ");
            for(int j = 0; j < m; j++){
                arr[i][j] = Integer.parseInt(str2[j]);
            }
        } {
            String[] str2 = br.readLine().split(" ");
            for(int j = 0; j < m; j++){
                arr[i][j] = Integer.parseInt(str2[j]);
            }
        } String[] str2 = br.readLine().split(" "); str2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m; j++){
                arr[i][j] = Integer.parseInt(str2[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                arr[i][j] = Integer.parseInt(str2[j]);
            } {
                arr[i][j] = Integer.parseInt(str2[j]);
            } arr[i][j] = Integer.parseInt(str2[j]) arr[i][j] arr[i] arr i j Integer.parseInt(str2[j]) Integer.parseInt Integer str2[j] str2 j for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            vec[i] = Integer.parseInt(br.readLine());
        } {
            vec[i] = Integer.parseInt(br.readLine());
        } vec[i] = Integer.parseInt(br.readLine()) vec[i] vec 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++){
                ans[i] += arr[i][j]*vec[j];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        } {
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        } for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                ans[i] += arr[i][j]*vec[j];
            } {
                ans[i] += arr[i][j]*vec[j];
            } ans[i] += arr[i][j]*vec[j] ans[i] ans i arr[i][j]*vec[j] arr[i][j] arr[i] arr i j vec[j] vec j for(int num : ans){
            System.out.println(num);
        } int num ans {
            System.out.println(num);
        } {
            System.out.println(num);
        } System.out.println(num) System.out.println System.out System System.out num String[] args args
import java.io.*;

class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        int n, m;
        String[] str;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        str = br.readLine().split(" ");
        n = Integer.parseInt(str[0]);
        m = Integer.parseInt(str[1]);

        int[][] arr = new int[n][m];
        int[] vec = new int[m];
        int[] ans = new int[n];

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

        for(int i = 0; i < m; i++){
            vec[i] = Integer.parseInt(br.readLine());
        }

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                ans[i] += arr[i][j]*vec[j];
            }
        }

        for(int num : ans){
            System.out.println(num);
        }
    }
}