public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} Main public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  } run {
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  } java.util.Scanner sc = new java.util.Scanner(in); sc new java.util.Scanner(in) int n n m; m int[] b; b int[][] a; a int i i j; j int[] c; c n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc b = new int[m] b new int[m] m a = new int[n][m] a new int[n][m] n m c = new int[n] c new int[n] n for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    } i = 0; i = 0 i 0 i < n i n i++ i++ i {
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    } {
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    } for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      } j = 0; 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(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    } i = 0; i = 0 i 0 i < m i m i++ i++ i {
      b[i] = sc.nextInt();
    } {
      b[i] = sc.nextInt();
    } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        c[i] += a[i][j] * b[j];
      }
    } i = 0; i = 0 i 0 i < n i n i++ i++ i {
      for(j = 0;j < m;j++){
        c[i] += a[i][j] * b[j];
      }
    } {
      for(j = 0;j < m;j++){
        c[i] += a[i][j] * b[j];
      }
    } for(j = 0;j < m;j++){
        c[i] += a[i][j] * b[j];
      } j = 0; 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(i = 0;i < n;i++){
      System.out.println(c[i]);
    } i = 0; 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 sc.close() sc.close sc java.io.InputStream in in java.io.PrintStream out out public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  } main {
    (new Main()).run(System.in, System.out);
  } (new Main()).run(System.in, System.out) (new Main()).run (new Main()) System.in System System.in System.out System System.out String[] args args public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} Main
public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n, m;
    int[] b;
    int[][] a;
    int i, j;
    int[] c;

    n = sc.nextInt();
    m = sc.nextInt();
    b = new int[m];
    a = new int[n][m];
    c = new int[n];

    for(i = 0;i < n;i++){
      for(j = 0;j < m;j++){
        a[i][j] = sc.nextInt();
      }
    }
    for(i = 0;i < m;i++){
      b[i] = sc.nextInt();
    }

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

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

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
}