import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] r = new int[n]; r new int[n] n for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[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++){
        a[i][j] = sc.nextInt();
      }
    } {
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    } for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      } int j=0; int j=0; j 0 j < m j m j++ j++ j {
        a[i][j] = sc.nextInt();
      } {
        a[i][j] = sc.nextInt();
      } a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
      b[j] = sc.nextInt();
    } {
      b[j] = sc.nextInt();
    } b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    } {
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    } r[i] = 0 r[i] r i 0 for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        r[i] += a[i][j]*b[j];
      } {
        r[i] += a[i][j]*b[j];
      } r[i] += a[i][j]*b[j] r[i] r i a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.println(r[i]) System.out.println System.out System System.out r[i] r i sc.close() sc.close sc String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt(),m=sc.nextInt();
    int[][] a = new int[n][m];   //メモリの動的確保
    int[] b = new int[m];
    int[] r = new int[n];
    for(int i=0;i < n;i++){
      for(int j=0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(int j = 0;j < m;j++){
      b[j] = sc.nextInt();
    }
    for(int i = 0;i < n;i++){
      r[i] = 0;
      for(int j = 0;j < m;j++){
        r[i] += a[i][j]*b[j];
      }
      System.out.println(r[i]);
    }
    sc.close();
  }
}
