import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    }
    
    public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    }
    
    public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    }
} Main public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    } main {
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int row = input.nextInt(); row input.nextInt() input.nextInt input int cow = input.nextInt(); cow input.nextInt() input.nextInt input int[][] A = new int[row][cow]; A new int[row][cow] row cow int[] b = new int[cow]; b new int[cow] cow for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt(); int i = 0; int i = 0; i 0 i < row i row i ++ i ++ i for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt(); for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt(); int j = 0; int j = 0; j 0 j < cow j cow j ++ j ++ j A[i][j] = input.nextInt(); A[i][j] = input.nextInt() A[i][j] A[i] A i j input.nextInt() input.nextInt input for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt(); int k = 0; int k = 0; k 0 k < cow k cow k ++ k ++ k b[k] = input.nextInt(); b[k] = input.nextInt() b[k] b k input.nextInt() input.nextInt input calculate(A, b) calculate A b String args[] args public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    } calculate {
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    } int sum = 0; sum 0 for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        } int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i ++ i ++ i {
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        } {
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        } for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]); int j = 0; int j = 0; j 0 j < A[0].length j A[0].length A[0] A 0 A[0].length j ++ j ++ j sum += (A[i][j] * b[j]); sum += (A[i][j] * b[j]) sum (A[i][j] * b[j]) A[i][j] A[i] A i j b[j] b j System.out.println(sum) System.out.println System.out System System.out sum sum = 0 sum 0 int[][] A A int[] b b public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    }
    
    public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    }
} public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    }
    
    public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int row = input.nextInt();
        int cow = input.nextInt();
        int[][] A = new int[row][cow];
        int[] b = new int[cow];
        for(int i = 0; i < row; i ++)
            for(int j = 0; j < cow; j ++)
                A[i][j] = input.nextInt();
        for(int k = 0; k < cow; k ++)
            b[k] = input.nextInt();
        calculate(A, b);    
    }
    
    public static void calculate(int[][] A, int[] b){
        int sum = 0;
        for(int i = 0; i < A.length; i ++){
            for(int j = 0; j < A[0].length; j ++)
                sum += (A[i][j] * b[j]);
            System.out.println(sum);
            sum = 0;
        }
    }
}
