import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int [] [] a = new int[n][m]; a new int[n][m] n m int [] b = new int [m]; b new int [m] m for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        } int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        } {
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        } for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            } int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
                a[x] [y] = scan.nextInt();
            } {
                a[x] [y] = scan.nextInt();
            } a[x] [y] = scan.nextInt() a[x] [y] a[x] a x y scan.nextInt() scan.nextInt scan for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        } int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
            b[y] = scan.nextInt();
        } {
            b[y] = scan.nextInt();
        } b[y] = scan.nextInt() b[y] b y scan.nextInt() scan.nextInt scan for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        } int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        } {
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        } int answer = 0; answer 0 for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            } int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
                answer = answer + (a[x] [y] * b[y]);
            } {
                answer = answer + (a[x] [y] * b[y]);
            } answer = answer + (a[x] [y] * b[y]) answer answer + (a[x] [y] * b[y]) answer (a[x] [y] * b[y]) a[x] [y] a[x] a x y b[y] b y System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int [] [] a = new int[n][m];
        int [] b = new int [m];
        for (int x = 0; x < n; x++){
            for (int y = 0; y < m; y++){
                a[x] [y] = scan.nextInt();
            }
        }
        for (int y = 0; y < m; y++){
            b[y] = scan.nextInt();
        }
        for(int x = 0; x < n; x++){
            int answer = 0;
            for(int y = 0; y < m; y++) {
                answer = answer + (a[x] [y] * b[y]);
            }
            System.out.println(answer);
        }
    }
}
