import java.util.Scanner;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   }
} import java.util.Scanner; Scanner java.util public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   } main {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] dimention = sc.nextLine().split(" "); dimention sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(dimention[0]); n Integer.parseInt(dimention[0]) Integer.parseInt Integer dimention[0] dimention 0 int m = Integer.parseInt(dimention[1]); m Integer.parseInt(dimention[1]) Integer.parseInt Integer dimention[1] dimention 1 int[][] matrix_1 = new int[n][m]; matrix_1 new int[n][m] n m int[] matrix_2 = new int[m]; matrix_2 new int[m] m int[] answer = new int[n]; answer new int[n] n for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      } int row = 0; int row = 0; row 0 row < n row n row ++ row ++ row {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      } {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      } String[] input = sc.nextLine().split(" "); input sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         } int col = 0; int col = 0; col 0 col < m col m col ++ col ++ col {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         } {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         } matrix_1[row][col] = Integer.parseInt(input[col]) matrix_1[row][col] matrix_1[row] matrix_1 row col Integer.parseInt(input[col]) Integer.parseInt Integer input[col] input col for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      } int i = 0; int i = 0; i 0 i < m i m i ++ i ++ i {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      } {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      } matrix_2[i] = Integer.parseInt(sc.nextLine()) matrix_2[i] matrix_2 i Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      } int row = 0; int row = 0; row 0 row < n row n row ++ row ++ row {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      } {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      } int temp = 0; temp 0 for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         } int col = 0; int col = 0; col 0 col < m col m col ++ col ++ col {
            temp += matrix_1[row][col] * matrix_2[col];
         } {
            temp += matrix_1[row][col] * matrix_2[col];
         } temp += matrix_1[row][col] * matrix_2[col] temp matrix_1[row][col] * matrix_2[col] matrix_1[row][col] matrix_1[row] matrix_1 row col matrix_2[col] matrix_2 col answer[row] = temp answer[row] answer row temp 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 public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   }
} public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   }
} Main
import java.util.Scanner;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String[] dimention = sc.nextLine().split(" ");
      int n = Integer.parseInt(dimention[0]);
      int m = Integer.parseInt(dimention[1]);
      
      //declaration of matrices
      int[][] matrix_1 = new int[n][m];
      int[] matrix_2 = new int[m];
      int[] answer = new int[n];
      
      //initialization of matrix_1
      for (int row = 0; row < n; row ++) {
         String[] input = sc.nextLine().split(" ");
         for(int col = 0; col < m; col ++) {
            matrix_1[row][col] = Integer.parseInt(input[col]);
         }
      }
      
      //initialization of matrix_2
      for (int i = 0; i < m; i ++) {
         matrix_2[i] = Integer.parseInt(sc.nextLine());
      }
      
      //calculation
      for (int row = 0; row < n; row ++) {
         int temp = 0;
         for (int col = 0; col < m; col ++) {
            temp += matrix_1[row][col] * matrix_2[col];
         }
         answer[row] = temp;
      }
      
      //print out
      for(int i = 0; i < n; i ++) {
         System.out.println(answer[i]);
      }
      
   }
}
