import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[][] bector1=new int[n][m];
        int[] bector2=new int[m];
        int[] ans=new int[n];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        }
        for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        }
        
        for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        }
        
        
    }
}
 import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[][] bector1=new int[n][m];
        int[] bector2=new int[m];
        int[] ans=new int[n];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        }
        for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        }
        
        for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        }
        
        
    }
} Main public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[][] bector1=new int[n][m];
        int[] bector2=new int[m];
        int[] ans=new int[n];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        }
        for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        }
        
        for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        }
        
        
    } main {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[][] bector1=new int[n][m];
        int[] bector2=new int[m];
        int[] ans=new int[n];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        }
        for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        }
        
        for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        }
        
        
    } 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[][] bector1=new int[n][m]; bector1 new int[n][m] n m int[] bector2=new int[m]; bector2 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++){
                bector1[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++){
                bector1[i][j]=sc.nextInt();
            }
        } {
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        } for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                bector1[i][j]=sc.nextInt();
            } {
                bector1[i][j]=sc.nextInt();
            } bector1[i][j]=sc.nextInt() bector1[i][j] bector1[i] bector1 i j sc.nextInt() sc.nextInt sc for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        } int k=0; int k=0; k 0 k<m k m k++ k++ k {
            bector2[k]=sc.nextInt();
        } {
            bector2[k]=sc.nextInt();
        } bector2[k]=sc.nextInt() bector2[k] bector2 k sc.nextInt() sc.nextInt sc for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        } int l=0; int l=0; l 0 l<n l n l++ l++ l {
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        } {
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        } for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            } int p=0; int p=0; p 0 p<m p m p++ p++ p {
                ans[l]+=bector1[l][p]*bector2[p];
            } {
                ans[l]+=bector1[l][p]*bector2[p];
            } ans[l]+=bector1[l][p]*bector2[p] ans[l] ans l bector1[l][p]*bector2[p] bector1[l][p] bector1[l] bector1 l p bector2[p] bector2 p System.out.println(ans[l]) System.out.println System.out System System.out ans[l] ans l String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[][] bector1=new int[n][m];
        int[] bector2=new int[m];
        int[] ans=new int[n];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                bector1[i][j]=sc.nextInt();
            }
        }
        for(int k=0;k<m;k++){
            bector2[k]=sc.nextInt();
        }
        
        for(int l=0;l<n;l++){
            for(int p=0;p<m;p++){
                ans[l]+=bector1[l][p]*bector2[p];
            }
            System.out.println(ans[l]);
        }
        
        
    }
}

