import java.util.Scanner;
class Main{
    int n,m,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        m = sc.nextInt();
        int [] []A = new int[n][m];
        int [] b = new int[m];
        int [] c = new int[n];
        for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        }
        for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        }
        for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        }
        for(x = 0; x < n; x++){
            System.out.println(c[x]);
        }
    }
    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.Scanner; Scanner java.util class Main{
    int n,m,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        m = sc.nextInt();
        int [] []A = new int[n][m];
        int [] b = new int[m];
        int [] c = new int[n];
        for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        }
        for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        }
        for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        }
        for(x = 0; x < n; x++){
            System.out.println(c[x]);
        }
    }
    public static void main(String[] args){
        new Main().solve();
    }
} Main int n n m m x x y; y public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        m = sc.nextInt();
        int [] []A = new int[n][m];
        int [] b = new int[m];
        int [] c = new int[n];
        for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        }
        for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        }
        for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        }
        for(x = 0; x < n; x++){
            System.out.println(c[x]);
        }
    } solve {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        m = sc.nextInt();
        int [] []A = new int[n][m];
        int [] b = new int[m];
        int [] c = new int[n];
        for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        }
        for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        }
        for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        }
        for(x = 0; x < n; x++){
            System.out.println(c[x]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.useDelimiter("\\s") sc.useDelimiter sc "\\s" 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 [] c = new int[n]; c new int[n] n for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        } x = 0; x = 0 x 0 x < n x n x++ x++ x {
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        } {
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        } c[x] = 0 c[x] c x 0 for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            } y = 0; y = 0 y 0 y < m y m y++ y++ y {
                A[x] [y]= sc.nextInt();
            } {
                A[x] [y]= sc.nextInt();
            } A[x] [y]= sc.nextInt() A[x] [y] A[x] A x y sc.nextInt() sc.nextInt sc for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        } y = 0; y = 0 y 0 y < m y m y++ y++ y {
            b[y]= sc.nextInt();
        } {
            b[y]= sc.nextInt();
        } b[y]= sc.nextInt() b[y] b y sc.nextInt() sc.nextInt sc for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        } x = 0; x = 0 x 0 x < n x n x++ x++ x {
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        } {
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        } for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            } y = 0; 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 for(x = 0; x < n; x++){
            System.out.println(c[x]);
        } x = 0; x = 0 x 0 x < n x n x++ x++ x {
            System.out.println(c[x]);
        } {
            System.out.println(c[x]);
        } System.out.println(c[x]) System.out.println System.out System System.out c[x] c x public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args
import java.util.Scanner;
class Main{
    int n,m,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        m = sc.nextInt();
        int [] []A = new int[n][m];
        int [] b = new int[m];
        int [] c = new int[n];
        for(x = 0; x < n; x++){
            c[x] = 0;
            for(y = 0; y < m; y++){
                A[x] [y]= sc.nextInt();
            }
        }
        for(y = 0; y < m; y++){
            b[y]= sc.nextInt();
        }
        for(x = 0; x < n; x++){
            for(y = 0; y < m; y++){
                c[x] = c[x] + A[x][y] * b[y];
            }
        }
        for(x = 0; x < n; x++){
            System.out.println(c[x]);
        }
    }
    public static void main(String[] args){
        new Main().solve();
    }
}