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;
    }
  }
} import java.util.*; util.* java import java.io.*; io.* java 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;
    }
  }
} 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;
    }
  } main {
    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;
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int numRow = scanner.nextInt(); numRow scanner.nextInt() scanner.nextInt scanner int numColumn = scanner.nextInt(); numColumn scanner.nextInt() scanner.nextInt scanner scanner.nextLine() scanner.nextLine scanner int[][] determinantA = new int[numRow][numColumn]; determinantA new int[numRow][numColumn] numRow numColumn int[] determinantB = new int[numColumn]; determinantB new int[numColumn] 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]); 
      }
    } int i = 0; int i = 0; i 0 i < numRow i numRow i++ i++ i {
      String[] rowElementsInString = scanner.nextLine().split(" ");
      for (int j = 0; j < numColumn; j++) {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      }
    } {
      String[] rowElementsInString = scanner.nextLine().split(" ");
      for (int j = 0; j < numColumn; j++) {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      }
    } String[] rowElementsInString = scanner.nextLine().split(" "); rowElementsInString scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " for (int j = 0; j < numColumn; j++) {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      } int j = 0; int j = 0; j 0 j < numColumn j numColumn j++ j++ j {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      } {
        determinantA[i][j] = Integer.parseInt(rowElementsInString[j]); 
      } determinantA[i][j] = Integer.parseInt(rowElementsInString[j]) determinantA[i][j] determinantA[i] determinantA i j Integer.parseInt(rowElementsInString[j]) Integer.parseInt Integer rowElementsInString[j] rowElementsInString j for (int i = 0; i < numColumn; i++) {
      determinantB[i] = Integer.parseInt(scanner.nextLine());
    } int i = 0; int i = 0; i 0 i < numColumn i numColumn i++ i++ i {
      determinantB[i] = Integer.parseInt(scanner.nextLine());
    } {
      determinantB[i] = Integer.parseInt(scanner.nextLine());
    } determinantB[i] = Integer.parseInt(scanner.nextLine()) determinantB[i] determinantB i Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int ans = 0; 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;
    } int y = 0; int y = 0; y 0 y < numRow y numRow y++ y++ y {
      for (int x = 0; x < numColumn; x++) {
        ans += determinantA[y][x] * determinantB[x];
      }
      System.out.println(ans);
      ans = 0;
    } {
      for (int x = 0; x < numColumn; x++) {
        ans += determinantA[y][x] * determinantB[x];
      }
      System.out.println(ans);
      ans = 0;
    } for (int x = 0; x < numColumn; x++) {
        ans += determinantA[y][x] * determinantB[x];
      } int x = 0; int x = 0; x 0 x < numColumn x numColumn x++ x++ x {
        ans += determinantA[y][x] * determinantB[x];
      } {
        ans += determinantA[y][x] * determinantB[x];
      } ans += determinantA[y][x] * determinantB[x] ans determinantA[y][x] * determinantB[x] determinantA[y][x] determinantA[y] determinantA y x determinantB[x] determinantB x System.out.println(ans) System.out.println System.out System System.out ans ans = 0 ans 0 String args[] args
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;
    }
  }
}