import java.util.*;

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

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    } main {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] A = new int[n][m]; A new int[n][m] n m int[] B = new int[m]; B new int[m] m int[] ans = new int[n]; ans new int[n] n for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[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++){
                A[i][j]=sc.nextInt();
            }
        } {
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        } for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            } int j=0; int j=0; j 0 j<m j m 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 i=0;i<m;i++){
            B[i]=sc.nextInt();
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            B[i]=sc.nextInt();
        } {
            B[i]=sc.nextInt();
        } B[i]=sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[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+=A[i][j]*B[j];
            }
            System.out.println(a);
        } {
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        } int a=0; a 0 for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
               a+=A[i][j]*B[j];
            } {
               a+=A[i][j]*B[j];
            } a+=A[i][j]*B[j] a A[i][j]*B[j] A[i][j] A[i] A i j B[j] B j System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    }
} Main
import java.util.*;

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

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] A = new int[n][m];
        int[] B = new int[m];
        int[] ans = new int[n];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                A[i][j]=sc.nextInt();
            }
        }
        for(int i=0;i<m;i++){
            B[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            int a=0;
            for(int j=0;j<m;j++){
               a+=A[i][j]*B[j];
            }
            System.out.println(a);
        }
    }
}

