import java.util.*;

class Main{
  
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] matrix = new int[n][m];
      int[] retu = new int[m];
      int[] ans = new int[n];
      for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      }
      for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      }
      for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      }
      for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    }
  }
} import java.util.*; util.* java class Main{
  
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] matrix = new int[n][m];
      int[] retu = new int[m];
      int[] ans = new int[n];
      for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      }
      for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      }
      for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      }
      for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] matrix = new int[n][m];
      int[] retu = new int[m];
      int[] ans = new int[n];
      for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      }
      for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      }
      for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      }
      for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    }
  } main {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] matrix = new int[n][m];
      int[] retu = new int[m];
      int[] ans = new int[n];
      for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      }
      for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      }
      for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      }
      for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] retu = new int[m]; retu new int[m] m int[] ans = new int[n]; ans new int[n] n for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      } {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      } for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        } int j=0; int j=0; j 0 j<m j m j++ j++ j {
          matrix[i][j] = sc.nextInt();
        } {
          matrix[i][j] = sc.nextInt();
        } matrix[i][j] = sc.nextInt() matrix[i][j] matrix[i] matrix i j sc.nextInt() sc.nextInt sc for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      } int i = 0; int i = 0; i 0 i<m i m i++ i++ i {
        retu[i] = sc.nextInt();   
      } {
        retu[i] = sc.nextInt();   
      } retu[i] = sc.nextInt() retu[i] retu i sc.nextInt() sc.nextInt sc for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      } {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      } for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        } int j =0; int j =0; j 0 j<m j m j++ j++ j {
          ans[i] += matrix[i][j] * retu[j];
        } {
          ans[i] += matrix[i][j] * retu[j];
        } ans[i] += matrix[i][j] * retu[j] ans[i] ans i matrix[i][j] * retu[j] matrix[i][j] matrix[i] matrix i j retu[j] retu j for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
        System.out.println(ans[i]);
    } {
        System.out.println(ans[i]);
    } System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args
import java.util.*;

class Main{
  
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = sc.nextInt();
      int[][] matrix = new int[n][m];
      int[] retu = new int[m];
      int[] ans = new int[n];
      for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
          matrix[i][j] = sc.nextInt();
        }
      }
      for(int i = 0; i<m; i++){
        retu[i] = sc.nextInt();   
      }
      for(int i = 0; i<n; i++) {
        for(int j =0; j<m; j++) {
          ans[i] += matrix[i][j] * retu[j];
        }
      }
      for (int i = 0; i<n; i++) {
        System.out.println(ans[i]);
    }
  }
}
