import java.util.Scanner;

class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        byte n = sc.nextByte();
        byte m = sc.nextByte();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        int[] vector = new int[m];
        for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        }



    }

} import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        byte n = sc.nextByte();
        byte m = sc.nextByte();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        int[] vector = new int[m];
        for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        }



    }

} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        byte n = sc.nextByte();
        byte m = sc.nextByte();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        int[] vector = new int[m];
        for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        }



    } main {

        Scanner sc = new Scanner(System.in);
        byte n = sc.nextByte();
        byte m = sc.nextByte();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        int[] vector = new int[m];
        for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        }



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) byte n = sc.nextByte(); n sc.nextByte() sc.nextByte sc byte m = sc.nextByte(); m sc.nextByte() sc.nextByte sc int[][] mat = new int[n][m]; mat new int[n][m] n m for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                mat[i][j] = sc.nextInt();
            } {
                mat[i][j] = sc.nextInt();
            } mat[i][j] = sc.nextInt() mat[i][j] mat[i] mat i j sc.nextInt() sc.nextInt sc int[] vector = new int[m]; vector new int[m] m for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            vector[i] = sc.nextInt();
        } {
            vector[i] = sc.nextInt();
        } vector[i] = sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        } {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        } int a = 0; a 0 for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a += mat[i][j] * vector[j];
            } {
                a += mat[i][j] * vector[j];
            } a += mat[i][j] * vector[j] a mat[i][j] * vector[j] mat[i][j] mat[i] mat i j vector[j] vector j System.out.println(a) System.out.println System.out System System.out a String[] args args
import java.util.Scanner;

class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        byte n = sc.nextByte();
        byte m = sc.nextByte();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        int[] vector = new int[m];
        for (int i = 0; i < m; i++) {
            vector[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int a = 0;
            for (int j = 0; j < m; j++) {
                a += mat[i][j] * vector[j];
            }
            System.out.println(a);
        }



    }

}
