/* ITP1_6_D */
import java.io.*;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} import java.io.*; io.* java class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} Main public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } main {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    } catch(Exception e){
      System.out.println(e);
    } Exception e {
      System.out.println(e);
    } System.out.println(e) System.out.println System.out System System.out e {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String[] size = br.readLine().split(" "); size br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(size[0]); n Integer.parseInt(size[0]) Integer.parseInt Integer size[0] size 0 int m = Integer.parseInt(size[1]); m Integer.parseInt(size[1]) Integer.parseInt Integer size[1] size 1 if(n < 1 || n > 100) return; n < 1 || n > 100 n < 1 n 1 n > 100 n 100 return; if(m < 1 || m > 100) return; m < 1 || m > 100 m < 1 m 1 m > 100 m 100 return; int[][] matrix1 = new int[n][m]; matrix1 new int[n][m] n m int[] matrix2 = new int[m]; matrix2 new int[m] m int[] matrix3 = new int[n]; matrix3 new int[n] n for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      } {
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      } String[] row = br.readLine().split(" "); row br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        } {
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        } int value = Integer.parseInt(row[j]); value Integer.parseInt(row[j]) Integer.parseInt Integer row[j] row j if(value < 0 || value > 1000) return; value < 0 || value > 1000 value < 0 value 0 value > 1000 value 1000 return; matrix1[i][j] = value matrix1[i][j] matrix1[i] matrix1 i j value for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        matrix2[j] = Integer.parseInt(br.readLine());
      } {
        matrix2[j] = Integer.parseInt(br.readLine());
      } matrix2[j] = Integer.parseInt(br.readLine()) matrix2[j] matrix2 j Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      } {
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      } matrix3[i] = 0 matrix3[i] matrix3 i 0 for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
          matrix3[i] += matrix1[i][j] * matrix2[j];
        } {
          matrix3[i] += matrix1[i][j] * matrix2[j];
        } matrix3[i] += matrix1[i][j] * matrix2[j] matrix3[i] matrix3 i matrix1[i][j] * matrix2[j] matrix1[i][j] matrix1[i] matrix1 i j matrix2[j] matrix2 j sb.append(matrix3[i] + "\n") sb.append sb matrix3[i] + "\n" matrix3[i] matrix3 i "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
/* ITP1_6_D */
import java.io.*;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      String[] size = br.readLine().split(" ");
      int n = Integer.parseInt(size[0]);
      int m = Integer.parseInt(size[1]);
      if(n < 1 || n > 100) return;
      if(m < 1 || m > 100) return;

      int[][] matrix1 = new int[n][m];
      int[] matrix2 = new int[m];
      int[] matrix3 = new int[n]; // answer

      // input matrix1
      for(int i = 0; i < n; i++){
        String[] row = br.readLine().split(" ");

        for(int j = 0; j < m; j++){
          int value = Integer.parseInt(row[j]);
          if(value < 0 || value > 1000) return;
          matrix1[i][j] = value;
        }
      }
      // input matrix2
      for(int j = 0; j < m; j++){
        matrix2[j] = Integer.parseInt(br.readLine());
      }

      // calculation
      for(int i = 0; i < n; i++){
        matrix3[i] = 0;
        for(int j = 0; j < m; j++){
          matrix3[i] += matrix1[i][j] * matrix2[j];
        }
        sb.append(matrix3[i] + "\n");
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
}