// Problem - Vector and Matrix
import java.util.Scanner;

class Main {
  public static void main(String[] args){
    // config
    Scanner scanner = new Scanner(System.in);

    // input
    String[] nums = scanner.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[][] A = new int[n][m];
    int[] b = new int[m];
    for(int i=0; i<n; i++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    }
    for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    }

    // matrix calc
    int[] answer = new int[n];
    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    }

    // output ( b : n * 1)
    for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    }

  }
}
 import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args){
    // config
    Scanner scanner = new Scanner(System.in);

    // input
    String[] nums = scanner.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[][] A = new int[n][m];
    int[] b = new int[m];
    for(int i=0; i<n; i++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    }
    for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    }

    // matrix calc
    int[] answer = new int[n];
    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    }

    // output ( b : n * 1)
    for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    }

  }
} Main public static void main(String[] args){
    // config
    Scanner scanner = new Scanner(System.in);

    // input
    String[] nums = scanner.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[][] A = new int[n][m];
    int[] b = new int[m];
    for(int i=0; i<n; i++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    }
    for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    }

    // matrix calc
    int[] answer = new int[n];
    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    }

    // output ( b : n * 1)
    for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    }

  } main {
    // config
    Scanner scanner = new Scanner(System.in);

    // input
    String[] nums = scanner.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[][] A = new int[n][m];
    int[] b = new int[m];
    for(int i=0; i<n; i++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    }
    for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    }

    // matrix calc
    int[] answer = new int[n];
    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    }

    // output ( b : n * 1)
    for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    }

  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] nums = scanner.nextLine().split(" "); nums scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int n = Integer.parseInt(nums[0]); n Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int m = Integer.parseInt(nums[1]); m Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 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++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i { // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    } { // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    } String[] r = scanner.nextLine().split(" "); r scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      } int j=0; int j=0; j 0 j<m j m j++ j++ j {
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      } {
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      } int tmp = Integer.parseInt(r[j]); tmp Integer.parseInt(r[j]) Integer.parseInt Integer r[j] r j A[i][j] = tmp A[i][j] A[i] A i j tmp for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    } int i=0; int i=0; i 0 i<m i m i++ i++ i { // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    } { // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    } String r = scanner.nextLine(); r scanner.nextLine() scanner.nextLine scanner b[i] = Integer.parseInt(r) b[i] b i Integer.parseInt(r) Integer.parseInt Integer r int[] answer = new int[n]; answer new int[n] n for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    } {
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    } for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      } int j=0; int j=0; j 0 j<m j m j++ j++ j {
        answer[i] += A[i][j] * b[j];
      } {
        answer[i] += A[i][j] * b[j];
      } answer[i] += A[i][j] * b[j] answer[i] answer i A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      System.out.println(answer[i]);
    } {
      System.out.println(answer[i]);
    } System.out.println(answer[i]) System.out.println System.out System System.out answer[i] answer i String[] args args
// Problem - Vector and Matrix
import java.util.Scanner;

class Main {
  public static void main(String[] args){
    // config
    Scanner scanner = new Scanner(System.in);

    // input
    String[] nums = scanner.nextLine().split(" ");
    int n = Integer.parseInt(nums[0]);
    int m = Integer.parseInt(nums[1]);
    int[][] A = new int[n][m];
    int[] b = new int[m];
    for(int i=0; i<n; i++){ // A input
      String[] r = scanner.nextLine().split(" ");
      for(int j=0; j<m; j++){
        int tmp = Integer.parseInt(r[j]);
        A[i][j] = tmp;
      }
    }
    for(int i=0; i<m; i++){ // b input
      String r = scanner.nextLine();
      b[i] = Integer.parseInt(r);
    }

    // matrix calc
    int[] answer = new int[n];
    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        answer[i] += A[i][j] * b[j];
      }
    }

    // output ( b : n * 1)
    for(int i=0; i<n; i++){
      System.out.println(answer[i]);
    }

  }
}

