import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int A[][] = new int[n][m];
    int b[] = new int[m];
    int c[] = new int[n];

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    }
    for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    }

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    }
  }
}
 import java.util.Scanner; Scanner 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 A[][] = new int[n][m];
    int b[] = new int[m];
    int c[] = new int[n];

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    }
    for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    }

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    }
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int A[][] = new int[n][m];
    int b[] = new int[m];
    int c[] = new int[n];

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    }
    for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    }

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int A[][] = new int[n][m];
    int b[] = new int[m];
    int c[] = new int[n];

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    }
    for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    }

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    }
  } 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 A[][] = new int[n][m]; A new int[n][m] n m int b[] = new int[m]; b new int[m] m int c[] = new int[n]; c new int[n] n for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    } int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    } {
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    } for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      } int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
        int v = sc.nextInt();
        A[x][y] = v;
      } {
        int v = sc.nextInt();
        A[x][y] = v;
      } int v = sc.nextInt(); v sc.nextInt() sc.nextInt sc A[x][y] = v A[x][y] A[x] A x y v c[x] = 0 c[x] c x 0 for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    } int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
      int v = sc.nextInt();
      b[x] = v;
    } {
      int v = sc.nextInt();
      b[x] = v;
    } int v = sc.nextInt(); v sc.nextInt() sc.nextInt sc b[x] = v b[x] b x v for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    } int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    } {
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    } for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      } int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
        c[x] = c[x]+(A[x][y]*b[y]);
      } {
        c[x] = c[x]+(A[x][y]*b[y]);
      } c[x] = c[x]+(A[x][y]*b[y]) c[x] c x c[x]+(A[x][y]*b[y]) c[x] c x (A[x][y]*b[y]) A[x][y] A[x] A x y b[y] b y System.out.println(c[x]) System.out.println System.out System System.out c[x] c x String args[] args
import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int A[][] = new int[n][m];
    int b[] = new int[m];
    int c[] = new int[n];

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        int v = sc.nextInt();
        A[x][y] = v;
      }
      c[x] = 0;
    }
    for(int x = 0; x < m; x++){
      int v = sc.nextInt();
      b[x] = v;
    }

    for(int x = 0; x < n; x++){
      for(int y = 0; y < m; y++){
        c[x] = c[x]+(A[x][y]*b[y]);
      }
      System.out.println(c[x]);
    }
  }
}

