import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums = br.readLine().split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);
        int i, j;
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int ci;
        String[] row;
        for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        }
        for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        }
        for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        }
    }
} import java.io.*; io.* java class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums = br.readLine().split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);
        int i, j;
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int ci;
        String[] row;
        for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        }
        for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        }
        for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        }
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums = br.readLine().split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);
        int i, j;
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int ci;
        String[] row;
        for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        }
        for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        }
        for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums = br.readLine().split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);
        int i, j;
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int ci;
        String[] row;
        for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        }
        for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        }
        for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] nums = br.readLine().split(" "); nums br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(nums[0]); n Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int m = Integer.parseInt(nums[1]); m Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 int i i j; j int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int ci; ci String[] row; row for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        } i = 0; i = 0 i 0 i < n i n i++ i++ i {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        } {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        } row = br.readLine().split(" ") row br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            } j = 0; j = 0 j 0 j < m j m j++ j++ j {
                A[i][j] = Integer.parseInt(row[j]);
            } {
                A[i][j] = Integer.parseInt(row[j]);
            } A[i][j] = Integer.parseInt(row[j]) A[i][j] A[i] A i j Integer.parseInt(row[j]) Integer.parseInt Integer row[j] row j for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        } j = 0; j = 0 j 0 j < m j m j++ j++ j {
            b[j] = Integer.parseInt(br.readLine());
        } {
            b[j] = Integer.parseInt(br.readLine());
        } b[j] = Integer.parseInt(br.readLine()) b[j] b j Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        } i = 0; i = 0 i 0 i < n i n i++ i++ i {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        } {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        } ci = 0 ci 0 for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            } j = 0; j = 0 j 0 j < m j m j++ j++ j {
                ci += A[i][j] * b[j];
            } {
                ci += A[i][j] * b[j];
            } ci += A[i][j] * b[j] ci A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j System.out.println(ci) System.out.println System.out System System.out ci String[] args args
import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums = br.readLine().split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);
        int i, j;
        int[][] A = new int[n][m];
        int[] b = new int[m];
        int ci;
        String[] row;
        for (i = 0; i < n; i++) {
            row = br.readLine().split(" ");
            for (j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(row[j]);
            }
        }
        for (j = 0; j < m; j++) {
            b[j] = Integer.parseInt(br.readLine());
        }
        for (i = 0; i < n; i++) {
            ci = 0;
            for (j = 0; j < m; j++) {
                ci += A[i][j] * b[j];
            }
            System.out.println(ci);
        }
    }
}