import java.util.*;

public class Main {
    public static final int MAX = 100;

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    }
} import java.util.*; util.* java public class Main {
    public static final int MAX = 100;

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    }
} Main public static final int MAX = 100; MAX 100 public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    } main {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int h = scn.nextInt() h scn.nextInt() scn.nextInt scn w = scn.nextInt(); w scn.nextInt() scn.nextInt scn int[] ary = new int[MAX]; ary new int[MAX] MAX int[][] tbl = new int[MAX][MAX]; tbl new int[MAX][MAX] MAX MAX for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        } int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        } {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        } for(int j = 0; j < w; tbl[i][j++] = scn.nextInt()); int j = 0; int j = 0; j 0 j < w j w tbl[i][j++] = scn.nextInt() tbl[i][j++] = scn.nextInt() tbl[i][j++] tbl[i] tbl i j++ j scn.nextInt() scn.nextInt scn ; for(int i = 0; i < w; ary[i++] = scn.nextInt()); int i = 0; int i = 0; i 0 i < w i w ary[i++] = scn.nextInt() ary[i++] = scn.nextInt() ary[i++] ary i++ i scn.nextInt() scn.nextInt scn ; for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        } int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        } {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        } int v = 0; v 0 for(int j = 0; j < w; v += tbl[i][j] * ary[j++]); int j = 0; int j = 0; j 0 j < w j w v += tbl[i][j] * ary[j++] v += tbl[i][j] * ary[j++] v tbl[i][j] * ary[j++] tbl[i][j] tbl[i] tbl i j ary[j++] ary j++ j ; System.out.println(v) System.out.println System.out System System.out v String[] args args public class Main {
    public static final int MAX = 100;

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    }
} public class Main {
    public static final int MAX = 100;

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    }
} Main
import java.util.*;

public class Main {
    public static final int MAX = 100;

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int h = scn.nextInt(), w = scn.nextInt();
        int[] ary = new int[MAX];
        int[][] tbl = new int[MAX][MAX];
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; tbl[i][j++] = scn.nextInt());
        }
        for(int i = 0; i < w; ary[i++] = scn.nextInt());
        for(int i = 0; i < h; i++) {
            int v = 0;
            for(int j = 0; j < w; v += tbl[i][j] * ary[j++]);
            System.out.println(v);
        }
    }
}