import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int width,height,i,j;
    height = sc.nextInt();
    width = sc.nextInt();
    int [][] a = new int[height][width];
    int [][] b = new int[width][1];
    int [][] c = new int[height][1];
    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    }

    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    }

    for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int width,height,i,j;
    height = sc.nextInt();
    width = sc.nextInt();
    int [][] a = new int[height][width];
    int [][] b = new int[width][1];
    int [][] c = new int[height][1];
    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    }

    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    }

    for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    }
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int width,height,i,j;
    height = sc.nextInt();
    width = sc.nextInt();
    int [][] a = new int[height][width];
    int [][] b = new int[width][1];
    int [][] c = new int[height][1];
    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    }

    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    }

    for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int width,height,i,j;
    height = sc.nextInt();
    width = sc.nextInt();
    int [][] a = new int[height][width];
    int [][] b = new int[width][1];
    int [][] c = new int[height][1];
    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    }

    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    }

    for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int width width height height i i j; j height = sc.nextInt() height sc.nextInt() sc.nextInt sc width = sc.nextInt() width sc.nextInt() sc.nextInt sc int [][] a = new int[height][width]; a new int[height][width] height width int [][] b = new int[width][1]; b new int[width][1] width 1 int [][] c = new int[height][1]; c new int[height][1] height 1 for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    } i = 0; i = 0 i 0 i < height i height i++ i++ i {
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    } {
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    } for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      } j = 0; j = 0 j 0 j < width j width 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(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    } i = 0; i = 0 i 0 i < width i width i++ i++ i {
      b[i][0] = sc.nextInt();
    } {
      b[i][0] = sc.nextInt();
    } b[i][0] = sc.nextInt() b[i][0] b[i] b i 0 sc.nextInt() sc.nextInt sc for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    } i = 0; i = 0 i 0 i < height i height i++ i++ i {
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    } {
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    } for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      } j = 0; j = 0 j 0 j < width j width j++ j++ j {
        c[i][0] += a[i][j] * b[j][0];
      } {
        c[i][0] += a[i][j] * b[j][0];
      } c[i][0] += a[i][j] * b[j][0] c[i][0] c[i] c i 0 a[i][j] * b[j][0] a[i][j] a[i] a i j b[j][0] b[j] b j 0 for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    } i = 0; i = 0 i 0 i < height i height i++ i++ i {
      System.out.println(c[i][0]);
    } {
      System.out.println(c[i][0]);
    } System.out.println(c[i][0]) System.out.println System.out System System.out c[i][0] c[i] c i 0 String args[] args
import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int width,height,i,j;
    height = sc.nextInt();
    width = sc.nextInt();
    int [][] a = new int[height][width];
    int [][] b = new int[width][1];
    int [][] c = new int[height][1];
    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < width;i++){
      b[i][0] = sc.nextInt();
    }

    for(i = 0;i < height;i++){
      for(j = 0;j < width;j++){
        c[i][0] += a[i][j] * b[j][0];
      }
    }

    for(i = 0;i < height;i++){
      System.out.println(c[i][0]);
    }
  }
}