import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    } 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 matrix_A[][] = new int[n][m]; matrix_A new int[n][m] n m int matrix_B[] = new int[m]; matrix_B new int[m] m int AB = 0; AB 0 for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                } {
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                } for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    } {
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc matrix_A[i][j] = num matrix_A[i][j] matrix_A[i] matrix_A i j num for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                } {
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc matrix_B[j] =  num matrix_B[j] matrix_B j num for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                } {
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                } for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                AB += matrix_A[i][j]*matrix_B[j];
                    } {
                AB += matrix_A[i][j]*matrix_B[j];
                    } AB += matrix_A[i][j]*matrix_B[j] AB matrix_A[i][j]*matrix_B[j] matrix_A[i][j] matrix_A[i] matrix_A i j matrix_B[j] matrix_B j System.out.println(AB) System.out.println System.out System System.out AB AB = 0 AB 0 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
                int m = sc.nextInt();
                int matrix_A[][] = new int[n][m];
                int matrix_B[] = new int[m]; 
                int AB = 0;
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                     int num = sc.nextInt();
                     matrix_A[i][j] = num;
                    }
                }
                for(int j = 0; j < m; j++){
                    int num = sc.nextInt();
                   matrix_B[j] =  num;
                }
                for(int i = 0; i < n; i++){
                    for(int j = 0; j < m; j++){
                AB += matrix_A[i][j]*matrix_B[j];
                    }
                    System.out.println(AB);
                    AB = 0;
                }
    }
}