import java.util.*;
import java.io.*;

public 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  }
}
 import java.util.*; util.* java import java.io.*; io.* java public 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  }
} 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  } 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  } 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 for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     } int i=0; int i=0; i 0 i<n i n i++ i++ i {
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     } {
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     } for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       } int j=0; int j=0; j 0 j<m j m j++ j++ j {
         A[i][j] = scanner.nextInt();
       } {
         A[i][j] = scanner.nextInt();
       } A[i][j] = scanner.nextInt() A[i][j] A[i] A i j scanner.nextInt() scanner.nextInt scanner for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     } int i=0; int i=0; i 0 i<m i m i++ i++ i {
       B[i] = scanner.nextInt();
     } {
       B[i] = scanner.nextInt();
     } B[i] = scanner.nextInt() B[i] B i scanner.nextInt() scanner.nextInt scanner for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     } int i=0; int i=0; i 0 i<n i n i++ i++ i {
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     } {
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     } int sum = 0; sum 0 for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       } int j=0; int j=0; j 0 j<m j m j++ j++ j {
         sum = sum + (A[i][j]*B[j]);
       } {
         sum = sum + (A[i][j]*B[j]);
       } sum = sum + (A[i][j]*B[j]) sum 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 String[] args args public 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  }
} public 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  }
} Main
import java.util.*;
import java.io.*;

public 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];

     for(int i=0;i<n;i++){
       for(int j=0;j<m;j++){
         A[i][j] = scanner.nextInt();
       }
     }

     for(int i=0;i<m;i++){
       B[i] = scanner.nextInt();
     }


     for(int i=0;i<n;i++){
       int sum = 0;
       for(int j=0;j<m;j++){
         sum = sum + (A[i][j]*B[j]);
       }
       System.out.println(sum);
     }
  }
}

