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

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] ar = br.readLine().split(" "); ar br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int row = Integer.parseInt(ar[0]); row Integer.parseInt(ar[0]) Integer.parseInt Integer ar[0] ar 0 int col = Integer.parseInt(ar[1]); col Integer.parseInt(ar[1]) Integer.parseInt Integer ar[1] ar 1 int[][] a = new int[row][col]; a new int[row][col] row col int[] b = new int[col]; b new int[col] col for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        } {
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        } ar = br.readLine().split(" ") ar br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            } int n = 0; int n = 0; n 0 n < a[i].length n a[i].length a[i] a i a[i].length n++ n++ n {
                a[i][n] = Integer.parseInt(ar[n]);
            } {
                a[i][n] = Integer.parseInt(ar[n]);
            } a[i][n] = Integer.parseInt(ar[n]) a[i][n] a[i] a i n Integer.parseInt(ar[n]) Integer.parseInt Integer ar[n] ar n for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < b.length i b.length b b.length i++ i++ i {
            b[i] = Integer.parseInt(br.readLine());
        } {
            b[i] = Integer.parseInt(br.readLine());
        } b[i] = Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        } {
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        } int ans = 0; ans 0 for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            } int n = 0; int n = 0; n 0 n < a[i].length n a[i].length a[i] a i a[i].length n++ n++ n {
                ans += a[i][n] * b[n];
            } {
                ans += a[i][n] * b[n];
            } ans += a[i][n] * b[n] ans a[i][n] * b[n] a[i][n] a[i] a i n b[n] b n System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ar = br.readLine().split(" ");
        int row = Integer.parseInt(ar[0]);
        int col = Integer.parseInt(ar[1]);
        int[][] a = new int[row][col];
        int[] b = new int[col];
        for(int i = 0; i < a.length; i++){
            ar = br.readLine().split(" ");
            for(int n = 0; n < a[i].length; n++){
                a[i][n] = Integer.parseInt(ar[n]);
            }
        }
        for(int i = 0; i < b.length; i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i = 0; i < a.length; i++){
            int ans = 0;
            for(int n = 0; n < a[i].length; n++){
                ans += a[i][n] * b[n];
            }
            System.out.println(ans);
        }
    }
}