import java.util.*;
 
class Main{
    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

        int[][] matrix = new int[n][m];
        int[] vectorB = new int[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        }
        for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        }
        for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

        int[][] matrix = new int[n][m];
        int[] vectorB = new int[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        }
        for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        }
        for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        }
    }
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

        int[][] matrix = new int[n][m];
        int[] vectorB = new int[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        }
        for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        }
        for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        }
    } main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

        int[][] matrix = new int[n][m];
        int[] vectorB = new int[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        }
        for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        }
        for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vectorB = new int[m]; vectorB new int[m] m for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        } {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        } for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j += 1 j += 1 j 1 {
                matrix[i][j] = scan.nextInt();
            } {
                matrix[i][j] = scan.nextInt();
            } matrix[i][j] = scan.nextInt() matrix[i][j] matrix[i] matrix i j scan.nextInt() scan.nextInt scan for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        } int s = 0; int s = 0; s 0 s < m s m s++ s++ s {
            vectorB[s] = scan.nextInt();
        } {
            vectorB[s] = scan.nextInt();
        } vectorB[s] = scan.nextInt() vectorB[s] vectorB s scan.nextInt() scan.nextInt scan for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        } int t = 0; int t = 0; t 0 t < n t n t++ t++ t {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        } {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        } int ans = 0; ans 0 for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            } int u = 0; int u = 0; u 0 u < m u m u++ u++ u {
                ans += matrix[t][u] * vectorB[u];
            } {
                ans += matrix[t][u] * vectorB[u];
            } ans += matrix[t][u] * vectorB[u] ans matrix[t][u] * vectorB[u] matrix[t][u] matrix[t] matrix t u vectorB[u] vectorB u System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
 
class Main{
    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

        int[][] matrix = new int[n][m];
        int[] vectorB = new int[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j += 1) {
                matrix[i][j] = scan.nextInt();
            }
        }
        for (int s = 0; s < m; s++) {
            vectorB[s] = scan.nextInt();
        }
        for (int t = 0; t < n; t++) {
            int ans = 0;
            for (int u = 0; u < m; u++) {
                ans += matrix[t][u] * vectorB[u];
            }
            System.out.println(ans);
        }
    }
}