import java.util.Scanner;
class Main{
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
       
       int n = sc.nextInt();
       int m = sc.nextInt();
       int[][] a = new int[n][m];
       int[] b = new int[m];
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       }
       for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       }
       int sum = 0;
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
       
       int n = sc.nextInt();
       int m = sc.nextInt();
       int[][] a = new int[n][m];
       int[] b = new int[m];
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       }
       for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       }
       int sum = 0;
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       }
    }
} Main public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
       
       int n = sc.nextInt();
       int m = sc.nextInt();
       int[][] a = new int[n][m];
       int[] b = new int[m];
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       }
       for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       }
       int sum = 0;
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       }
    } main {
       Scanner sc = new Scanner(System.in);
       
       int n = sc.nextInt();
       int m = sc.nextInt();
       int[][] a = new int[n][m];
       int[] b = new int[m];
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       }
       for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       }
       int sum = 0;
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 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[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       } int i=0; int i=0; i 0 i<n i n i++ i++ i {
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       } {
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       } for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           } int j=0; int j=0; j 0 j<m j m j++ j++ j {
               int oa = sc.nextInt();
               a[i][j] = oa; 
           } {
               int oa = sc.nextInt();
               a[i][j] = oa; 
           } int oa = sc.nextInt(); oa sc.nextInt() sc.nextInt sc a[i][j] = oa a[i][j] a[i] a i j oa for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       } int j=0; int j=0; j 0 j<m j m j++ j++ j {
           int ob = sc.nextInt();
           b[j] = ob;
       } {
           int ob = sc.nextInt();
           b[j] = ob;
       } int ob = sc.nextInt(); ob sc.nextInt() sc.nextInt sc b[j] = ob b[j] b j ob int sum = 0; sum 0 for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       } int i=0; int i=0; i 0 i<n i n i++ i++ i {
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       } {
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       } for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           } int j=0; int j=0; j 0 j<m j m j++ j++ j {
            sum += a[i][j]*b[j];
           } {
            sum += a[i][j]*b[j];
           } sum += a[i][j]*b[j] sum a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.println(sum) System.out.println System.out System System.out sum sum = 0 sum 0 String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
       
       int n = sc.nextInt();
       int m = sc.nextInt();
       int[][] a = new int[n][m];
       int[] b = new int[m];
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
               int oa = sc.nextInt();
               a[i][j] = oa; 
           }
       }
       for(int j=0; j<m; j++){
           int ob = sc.nextInt();
           b[j] = ob;
       }
       int sum = 0;
       for(int i=0; i<n; i++){
           for(int j=0; j<m; j++){
            sum += a[i][j]*b[j];
           }
           System.out.println(sum);
           sum = 0;
       }
    }
}
