import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int[][] A = new int[n1][n2];
        int[] B = new int[n2];
        for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        }
        for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        }
        	for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int[][] A = new int[n1][n2];
        int[] B = new int[n2];
        for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        }
        for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        }
        	for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int[][] A = new int[n1][n2];
        int[] B = new int[n2];
        for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        }
        for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        }
        	for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            }
    } main {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int[][] A = new int[n1][n2];
        int[] B = new int[n2];
        for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        }
        for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        }
        	for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n1 = sc.nextInt(); n1 sc.nextInt() sc.nextInt sc int n2 = sc.nextInt(); n2 sc.nextInt() sc.nextInt sc int[][] A = new int[n1][n2]; A new int[n1][n2] n1 n2 int[] B = new int[n2]; B new int[n2] n2 for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        } int i=0; int i=0; i 0 i<n1 i n1 i++ i++ i {
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        } {
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        } for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            } int j=0; int j=0; j 0 j<n2 j n2 j++ j++ j {
             A[i][j]= sc.nextInt();
            } {
             A[i][j]= sc.nextInt();
            } A[i][j]= sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        } int k=0; int k=0; k 0 k<n2 k n2 k++ k++ k {
            B[k] = sc.nextInt();
        } {
            B[k] = sc.nextInt();
        } B[k] = sc.nextInt() B[k] B k sc.nextInt() sc.nextInt sc for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            } int i=0; int i=0; i 0 i<n1 i n1 i++ i++ i {
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            } {
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            } int sum =0; sum 0 for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                } int j=0; int j=0; j 0 j<n2 j n2 j++ j++ j {
                    sum += A[i][j] * B[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 String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int[][] A = new int[n1][n2];
        int[] B = new int[n2];
        for(int i=0;i<n1;i++){
            for(int j=0;j<n2;j++){
             A[i][j]= sc.nextInt();
            }
        }
        for(int k=0;k<n2;k++){
            B[k] = sc.nextInt();
        }
        	for(int i=0;i<n1;i++){
                int sum =0;
                for(int j=0;j<n2;j++){
                    sum += A[i][j] * B[j];
                }
                System.out.println(sum);
            }
    }
}
