import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        final int n = Integer.parseInt(sc.next());
        final int m = Integer.parseInt(sc.next());
        final int a[][] = new int[n][m];
        final int b[] = new int[m];
        for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next());
        for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        }
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        final int n = Integer.parseInt(sc.next());
        final int m = Integer.parseInt(sc.next());
        final int a[][] = new int[n][m];
        final int b[] = new int[m];
        for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next());
        for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        }
        out.flush();
    }
} Main private static final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] Args){
        final int n = Integer.parseInt(sc.next());
        final int m = Integer.parseInt(sc.next());
        final int a[][] = new int[n][m];
        final int b[] = new int[m];
        for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next());
        for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        }
        out.flush();
    } main {
        final int n = Integer.parseInt(sc.next());
        final int m = Integer.parseInt(sc.next());
        final int a[][] = new int[n][m];
        final int b[] = new int[m];
        for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next());
        for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        }
        out.flush();
    } final int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int a[][] = new int[n][m]; a new int[n][m] n m final int b[] = new int[m]; b new int[m] m for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        } 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] = Integer.parseInt(sc.next());
            }
        } {
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        } for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
                a[i][j] = Integer.parseInt(sc.next());
            } {
                a[i][j] = Integer.parseInt(sc.next());
            } a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next()); int i = 0; int i = 0; i 0 i<m i m i++ i++ i b[i] = Integer.parseInt(sc.next()); b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        } {
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        } int ans = 0; ans 0 for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            } int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
                ans += a[i][j]*b[j];
            } {
                ans += a[i][j]*b[j];
            } ans += a[i][j]*b[j] ans a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j out.println(ans) out.println out ans out.flush() out.flush out String[] Args Args
import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        final int n = Integer.parseInt(sc.next());
        final int m = Integer.parseInt(sc.next());
        final int a[][] = new int[n][m];
        final int b[] = new int[m];
        for(int i = 0; i<n; i++){
            for(int j = 0; j<m; j++){
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for(int i = 0; i<m; i++)
            b[i] = Integer.parseInt(sc.next());
        for(int i = 0; i<n; i++){
            int ans = 0;
            for(int j = 0; j<m; j++){
                ans += a[i][j]*b[j];
            }
            out.println(ans);
        }
        out.flush();
    }
}