import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int height = sc.nextInt(); height sc.nextInt() sc.nextInt sc int width = sc.nextInt(); width sc.nextInt() sc.nextInt sc int[][] matrix = new int[height][width]; matrix new int[height][width] height width int[] matrix2 = new int[width]; matrix2 new int[width] width for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        } int hei = 0; int hei = 0; hei 0 hei < height hei height hei++ hei++ hei {
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        } {
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        } for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            } int wid = 0; int wid = 0; wid 0 wid < width wid width wid++ wid++ wid {
                matrix[hei][wid] = sc.nextInt();    
            } {
                matrix[hei][wid] = sc.nextInt();    
            } matrix[hei][wid] = sc.nextInt() matrix[hei][wid] matrix[hei] matrix hei wid sc.nextInt() sc.nextInt sc for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        } int wid = 0; int wid = 0; wid 0 wid < width wid width wid++ wid++ wid {
            matrix2[wid] = sc.nextInt();
        } {
            matrix2[wid] = sc.nextInt();
        } matrix2[wid] = sc.nextInt() matrix2[wid] matrix2 wid sc.nextInt() sc.nextInt sc for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        } int hei = 0; int hei = 0; hei 0 hei < height hei height hei++ hei++ hei {
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        } {
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        } int sumMultiplication = 0; sumMultiplication 0 for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            } int wid = 0; int wid = 0; wid 0 wid < width wid width wid++ wid++ wid {
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            } {
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            } sumMultiplication += matrix[hei][wid] * matrix2[wid] sumMultiplication matrix[hei][wid] * matrix2[wid] matrix[hei][wid] matrix[hei] matrix hei wid matrix2[wid] matrix2 wid if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                } wid == width-1 wid width-1 width 1 {
                    System.out.println(sumMultiplication);
                    continue;
                } System.out.println(sumMultiplication) System.out.println System.out System System.out sumMultiplication continue; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        int width = sc.nextInt();;
        int[][] matrix = new int[height][width];
        int[] matrix2 = new int[width];
        
        //入力
        for(int hei = 0; hei < height; hei++){
            for(int wid = 0; wid < width; wid++){
                matrix[hei][wid] = sc.nextInt();    
            }
        }
        
        //入力
        for(int wid = 0; wid < width; wid++){
            matrix2[wid] = sc.nextInt();
        }
        
        // 出力
        for(int hei = 0; hei < height; hei++){
            int sumMultiplication = 0;
            for(int wid = 0; wid < width; wid++){
                sumMultiplication += matrix[hei][wid] * matrix2[wid];
                if(wid == width-1){
                    System.out.println(sumMultiplication);
                    continue;
                }
            }
        }
    }
}
