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

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] lines = br.readLine().split(" "); lines br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(lines[0]); n Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int m = Integer.parseInt(lines[1]); m Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 int[][] vector1 = new int[n][m]; vector1 new int[n][m] n m for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        } {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        } lines = br.readLine().split(" ") lines br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                vector1[i][j] = Integer.parseInt(lines[j]);
            } {
                vector1[i][j] = Integer.parseInt(lines[j]);
            } vector1[i][j] = Integer.parseInt(lines[j]) vector1[i][j] vector1[i] vector1 i j Integer.parseInt(lines[j]) Integer.parseInt Integer lines[j] lines j int[] vector2 = new int[m]; vector2 new int[m] m for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            vector2[i] = Integer.parseInt(br.readLine());
        } {
            vector2[i] = Integer.parseInt(br.readLine());
        } vector2[i] = Integer.parseInt(br.readLine()) vector2[i] vector2 i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        } {
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        } int sum=0; sum 0 for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                sum+=vector1[i][j]*vector2[j];
            } {
                sum+=vector1[i][j]*vector2[j];
            } sum+=vector1[i][j]*vector2[j] sum vector1[i][j]*vector2[j] vector1[i][j] vector1[i] vector1 i j vector2[j] vector2 j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    }
} public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

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

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int[][] vector1 = new int[n][m];
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                vector1[i][j] = Integer.parseInt(lines[j]);
            }
        }
        int[] vector2 = new int[m];
        for (int i = 0; i < m; i++) {
            vector2[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            int sum=0;
            for(int j=0;j<m;j++){
                sum+=vector1[i][j]*vector2[j];
            }
            System.out.println(sum);
        }

    }
}