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

class Main {
  public static void main(String args[]) {
    Scanner scanner = new Scanner(System.in);
    int numRow = scanner.nextInt();
    int numColumn = scanner.nextInt();
    scanner.nextLine(); // expecting line break
    int[][] determinantA = new int[numRow][numColumn];
    int[] determinantB = new int[numColumn];
    for (int i = 0; i < numRow; i++) {
      String[] rowElementsInString = scanner.nextLine().split(" ");
      for (int j = 0; j < numColumn; j++) {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      }
    }
    for (int i = 0; i < numColumn; i++) {
      determinantB[i] = Integer.parseInt(scanner.nextLine());
    }
    int ans = 0;
    for (int y = 0; y < numRow; y++) {
      for (int x = 0; x < numColumn; x++) {
        ans += determinantA[y][x] * determinantB[x];
      }
      System.out.println(ans);
      ans = 0;
    }
  }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz