import java.util.*;
import java.io.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    }
} Main public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    } main {
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt() n in.nextInt() in.nextInt in m = in.nextInt(); m in.nextInt() in.nextInt in int[][] M = new int[n][m]; M new int[n][m] n m int[] V = new int[m]; V new int[m] m for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        } {
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        } for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next()); int j = 0; int j = 0; j 0 j < m j m j++ j++ j M[i][j]=Integer.parseInt(in.next()); M[i][j]=Integer.parseInt(in.next()) M[i][j] M[i] M i j Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next()); int i = 0; int i = 0; i 0 i < m i m i++ i++ i V[i] = Integer.parseInt(in.next()); V[i] = Integer.parseInt(in.next()) V[i] V i Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        } {
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        } int sum = 0; sum 0 for(int j = 0; j < m; j++)sum += M[i][j] * V[j]; int j = 0; int j = 0; j 0 j < m j m j++ j++ j sum += M[i][j] * V[j]; sum += M[i][j] * V[j] sum M[i][j] * V[j] M[i][j] M[i] M i j V[j] V j System.out.println(sum) System.out.println System.out System System.out sum String args[] args public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    }
} public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    }
} Main
import java.util.*;
import java.io.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt(), m = in.nextInt();
        int[][] M = new int[n][m];
        int[] V = new int[m];

        //input
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++)M[i][j]=Integer.parseInt(in.next());
        }

        for(int i = 0; i < m; i++) V[i] = Integer.parseInt(in.next());

        //solve and output
        for(int i = 0; i < n; i++){
            int sum = 0;
            for(int j = 0; j < m; j++)sum += M[i][j] * V[j];
            System.out.println(sum);
        }
    }
}
