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

class Main{
  public static void main(String[] args) throws IOException{
    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int[][] A=new int[n][m];
    int[] b=new int[m];
    for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    }
    for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    }
    int[] c=new int[n];
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    }
    for(int i=0;i<n;i++){
      System.out.println(c[i]);
    }
  }
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.*; lang.* java class Main{
  public static void main(String[] args) throws IOException{
    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int[][] A=new int[n][m];
    int[] b=new int[m];
    for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    }
    for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    }
    int[] c=new int[n];
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    }
    for(int i=0;i<n;i++){
      System.out.println(c[i]);
    }
  }
} Main public static void main(String[] args) throws IOException{
    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int[][] A=new int[n][m];
    int[] b=new int[m];
    for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    }
    for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    }
    int[] c=new int[n];
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    }
    for(int i=0;i<n;i++){
      System.out.println(c[i]);
    }
  } main {
    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int[][] A=new int[n][m];
    int[] b=new int[m];
    for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    }
    for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    }
    int[] c=new int[n];
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    }
    for(int i=0;i<n;i++){
      System.out.println(c[i]);
    }
  } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=Integer.parseInt(scan.next()); n Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int m=Integer.parseInt(scan.next()); m Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int[][] A=new int[n][m]; A new int[n][m] n m int[] b=new int[m]; b new int[m] m for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    } int i=0; int i=0; i 0 i<A.length i A.length A A.length i++ i++ i {
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    } {
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    } for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      } int j=0; int j=0; j 0 j<A[i].length j A[i].length A[i] A i A[i].length j++ j++ j {
        A[i][j]=Integer.parseInt(scan.next());
      } {
        A[i][j]=Integer.parseInt(scan.next());
      } A[i][j]=Integer.parseInt(scan.next()) A[i][j] A[i] A i j Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    } int i=0; int i=0; i 0 i<b.length i b.length b b.length i++ i++ i {
      b[i]=Integer.parseInt(scan.next());
    } {
      b[i]=Integer.parseInt(scan.next());
    } b[i]=Integer.parseInt(scan.next()) b[i] b i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int[] c=new int[n]; c new int[n] n for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    } {
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    } for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      } int j=0; int j=0; j 0 j<m j m j++ j++ j {
          c[i]+=A[i][j]*b[j];
      } {
          c[i]+=A[i][j]*b[j];
      } c[i]+=A[i][j]*b[j] c[i] c i A[i][j]*b[j] A[i][j] A[i] A i j b[j] b j for(int i=0;i<n;i++){
      System.out.println(c[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      System.out.println(c[i]);
    } {
      System.out.println(c[i]);
    } System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args
import java.io.*;
import java.util.*;
import java.lang.*;

class Main{
  public static void main(String[] args) throws IOException{
    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int[][] A=new int[n][m];
    int[] b=new int[m];
    for(int i=0;i<A.length;i++){
      for(int j=0;j<A[i].length;j++){
        A[i][j]=Integer.parseInt(scan.next());
      }
    }
    for(int i=0;i<b.length;i++){
      b[i]=Integer.parseInt(scan.next());
    }
    int[] c=new int[n];
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
          c[i]+=A[i][j]*b[j];
      }
    }
    for(int i=0;i<n;i++){
      System.out.println(c[i]);
    }
  }
}
