import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    }
} import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int var = Integer.parseInt(input[0]); var Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int hor = Integer.parseInt(input[1]); hor Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 int[][] matrix = new int[var][hor]; matrix new int[var][hor] var hor int[] vector = new int[hor]; vector new int[hor] hor for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } int i = 0; int i = 0; i 0 i < var i var i++ i++ i {
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } {
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            } int j = 0; int j = 0; j 0 j < hor j hor j++ j++ j {
                matrix[i][j] = Integer.parseInt(line[j]);
            } {
                matrix[i][j] = Integer.parseInt(line[j]);
            } matrix[i][j] = Integer.parseInt(line[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < hor i hor i++ i++ i {
            vector[i] = Integer.parseInt(br.readLine());
        } {
            vector[i] = Integer.parseInt(br.readLine());
        } vector[i] = Integer.parseInt(br.readLine()) vector[i] vector i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        } int i = 0; int i = 0; i 0 i < var i var i++ i++ i {
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        } {
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        } int result = 0; result 0 for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            } int j = 0; int j = 0; j 0 j < hor j hor j++ j++ j {
                result += matrix[i][j] * vector[j];
            } {
                result += matrix[i][j] * vector[j];
            } result += matrix[i][j] * vector[j] result matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    }
} public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    }
} Main
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
        String[] input = br.readLine().split(" ");
        int var = Integer.parseInt(input[0]);
        int hor = Integer.parseInt(input[1]);

        int[][] matrix = new int[var][hor];
        int[] vector = new int[hor];
        
        //data input
        for(int i = 0; i < var; i++){
            String[] line = br.readLine().split(" ");
            for(int j = 0; j < hor; j++){
                matrix[i][j] = Integer.parseInt(line[j]);
            }
        }
        for(int i = 0; i < hor; i++){
            vector[i] = Integer.parseInt(br.readLine());
        }
        
        //data output
        for(int i = 0; i < var; i++){
            int result = 0;
            for(int j = 0; j < hor; j++){
                result += matrix[i][j] * vector[j];
            }
            System.out.println(result);
        }

    }
}