import java.util.Arrays;
import java.util.Scanner;
class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int[] sum = new int[m];

        scanner.nextLine();
        for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        }

        for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        }
        
        for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        }
    }
}
 import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int[] sum = new int[m];

        scanner.nextLine();
        for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        }

        for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        }
        
        for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        }
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int[] sum = new int[m];

        scanner.nextLine();
        for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        }

        for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        }
        
        for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int[] sum = new int[m];

        scanner.nextLine();
        for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        }

        for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        }
        
        for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] sum = new int[m]; sum new int[m] m scanner.nextLine() scanner.nextLine scanner for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        } {
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        } String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String inputTmp[] = input.split(" "); inputTmp input.split(" ") input.split input " " int j = 0; j 0 for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            } String num inputTmp {
                A[i][j] = Integer.parseInt(num);
                j++;
            } {
                A[i][j] = Integer.parseInt(num);
                j++;
            } A[i][j] = Integer.parseInt(num) A[i][j] A[i] A i j Integer.parseInt(num) Integer.parseInt Integer num j++ j for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            int num = scanner.nextInt();
            b[i] = num;
        } {
            int num = scanner.nextInt();
            b[i] = num;
        } int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner b[i] = num b[i] b i num for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        } int[] a A {
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        } {
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        } int val = 0; val 0 for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            } int k = 0; int k = 0; k 0 k<m k m k++ k++ k {
                val += a[k] * b[k];
            } {
                val += a[k] * b[k];
            } val += a[k] * b[k] val a[k] * b[k] a[k] a k b[k] b k System.out.println(val) System.out.println System.out System System.out val String args[] args
import java.util.Arrays;
import java.util.Scanner;
class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int[] sum = new int[m];

        scanner.nextLine();
        for(int i=0;i<n;i++){
            String input = scanner.nextLine();
            String inputTmp[] = input.split(" ");
            int j = 0;
            for (String num : inputTmp) {
                A[i][j] = Integer.parseInt(num);
                j++;
            }
        }

        for(int i=0;i<m;i++){
            int num = scanner.nextInt();
            b[i] = num;
        }
        
        for(int[] a: A){
            int val = 0;
            for(int k = 0;k<m;k++){
                val += a[k] * b[k];
            }
            System.out.println(val);
        }
    }
}

