import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } String[] arr1 = br.readLine().split(" "); arr1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(arr1[0]) n Integer.parseInt(arr1[0]) Integer.parseInt Integer arr1[0] arr1 0 m = Integer.parseInt(arr1[1]); m Integer.parseInt(arr1[1]) Integer.parseInt Integer arr1[1] arr1 1 int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            } {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            } String[] arr2 = br.readLine().split(" "); arr2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                    A[i][j] = Integer.parseInt(arr2[j]);
                } {
                    A[i][j] = Integer.parseInt(arr2[j]);
                } A[i][j] = Integer.parseInt(arr2[j]) A[i][j] A[i] A i j Integer.parseInt(arr2[j]) Integer.parseInt Integer arr2[j] arr2 j for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            } int i=0; int i=0; i 0 i<m i m i++ i++ i {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            } {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            } b[i] = Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            } {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            } int tmp = 0; tmp 0 for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                    tmp += A[i][j]*b[j];
                } {
                    tmp += A[i][j]*b[j];
                } tmp += A[i][j]*b[j] tmp A[i][j]*b[j] A[i][j] A[i] A i j b[j] b j System.out.printf("%d\n", tmp) System.out.printf System.out System System.out "%d\n" tmp String[] args args public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String[] arr1 = br.readLine().split(" ");
            int n = Integer.parseInt(arr1[0]), m = Integer.parseInt(arr1[1]);
            // int n = 3, m = 4;

            int[][] A = new int[n][m];
            int[] b = new int[m];
            // A
            // String[] hoge = {"1 2 0 1", "0 3 0 1","4 1 1 0"};
            for(int i=0; i<n; i++) {
                String[] arr2 = br.readLine().split(" ");
                // String[] arr2 = hoge[i].split(" ");
                for(int j=0;j<m;j++){
                    A[i][j] = Integer.parseInt(arr2[j]);
                }
            }
            // b
            // int[] fuga = {1, 2, 3, 0};
            for(int i=0; i<m; i++) {
                b[i] = Integer.parseInt(br.readLine());
                // b[i] = fuga[i];
            }
            
            for(int i=0; i<n; i++) {
                int tmp = 0;
                for(int j=0; j<m; j++){
                    tmp += A[i][j]*b[j];
                }
                System.out.printf("%d\n", tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
