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 [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
}}
 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 [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
}} Main public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int m = sc.nextInt();
      
       int [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
} main {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int m = sc.nextInt();
      
       int [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
} 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 [] [] Arr1 = new int [n] [m]; Arr1 new int [n] [m] n m int [] [] Arr2 = new int [m][1]; Arr2 new int [m][1] m 1 for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       } int j =0; int j =0; j 0 j<n j n j++ j++ j {
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       } {
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       } for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           } int i = 0; int i = 0; i 0 i<m i m i++ i++ i {
           Arr1 [j][i] = sc.nextInt();
           } {
           Arr1 [j][i] = sc.nextInt();
           } Arr1 [j][i] = sc.nextInt() Arr1 [j][i] Arr1 [j] Arr1 j i sc.nextInt() sc.nextInt sc for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       } int i = 0; int i = 0; i 0 i<m i m i++ i++ i {
       Arr2[i][0] = sc.nextInt();
       } {
       Arr2[i][0] = sc.nextInt();
       } Arr2[i][0] = sc.nextInt() Arr2[i][0] Arr2[i] Arr2 i 0 sc.nextInt() sc.nextInt sc for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       } {
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       } int M = 0; M 0 for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];} int i = 0; int i = 0; i 0 i<m i m i++ i++ i {
           M = M +Arr2[i][0] * Arr1[j][i];} {
           M = M +Arr2[i][0] * Arr1[j][i];} M = M +Arr2[i][0] * Arr1[j][i] M M +Arr2[i][0] * Arr1[j][i] M Arr2[i][0] * Arr1[j][i] Arr2[i][0] Arr2[i] Arr2 i 0 Arr1[j][i] Arr1[j] Arr1 j i System.out.println(M) System.out.println System.out System System.out M 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 [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

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

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
}} 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 [] [] Arr1 = new int [n] [m];
       int [] [] Arr2 = new int [m][1];
       for(int j =0; j<n;j++){
           for(int i = 0; i<m; i++){
           Arr1 [j][i] = sc.nextInt();
           }
       }
       for(int i = 0; i<m; i++){
       Arr2[i][0] = sc.nextInt();
       }
       

       for(int j = 0; j<n; j++){
       int M = 0;
           for(int i = 0; i<m;i++){
           M = M +Arr2[i][0] * Arr1[j][i];}
       System.out.println(M);
       }
}}

