import java.util.*;

class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                }
        }
} import java.util.*; util.* java class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                }
        }
} Main public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                }
        } main {
                try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                }
        } try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                } {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int 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 for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        } 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] = sc.nextInt();
                                }
                        } {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        } for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                } int j = 0; int 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 int[] x = new int[m]; x new int[m] m for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                                x[i] = sc.nextInt();
                        } {
                                x[i] = sc.nextInt();
                        } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.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 += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        } {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        } int ans = 0; ans 0 for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                                        ans += x[j] * a[i][j];
                                } {
                                        ans += x[j] * a[i][j];
                                } ans += x[j] * a[i][j] ans x[j] * a[i][j] x[j] x j a[i][j] a[i] a i j 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[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        int n = sc.nextInt(), m = sc.nextInt();
                        int[][] a = new int[n][m];
                        for (int i = 0; i < n; i++) {
                                for (int j = 0; j < m; j++) {
                                        a[i][j] = sc.nextInt();
                                }
                        }
                        int[] x = new int[m];
                        for (int i = 0; i < m; i++) {
                                x[i] = sc.nextInt();
                        }
                        for (int i = 0; i < n; i++) {
                                int ans = 0;
                                for (int j = 0; j < m; j++) {
                                        ans += x[j] * a[i][j];
                                }
                                System.out.println(ans);
                        }
                }
        }
}