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

class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st; st try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } String inputData[] = br.readLine().split(" "); inputData br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int sum = 0; sum 0 int row = Integer.parseInt(inputData[0]) row Integer.parseInt(inputData[0]) Integer.parseInt Integer inputData[0] inputData 0 column = Integer.parseInt(inputData[1]); column Integer.parseInt(inputData[1]) Integer.parseInt Integer inputData[1] inputData 1 String data[][] = new String[row][column]; data new String[row][column] row column String data2[] = new String[column]; data2 new String[column] column for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            } int i = 0; int i = 0; i 0 i < row i row i++ i++ i {
                data[i] = br.readLine().split(" ");
            } {
                data[i] = br.readLine().split(" ");
            } data[i] = br.readLine().split(" ") data[i] data i br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int i = 0; i < column; i++)
                data2[i] = br.readLine(); int i = 0; int i = 0; i 0 i < column i column i++ i++ i data2[i] = br.readLine(); data2[i] = br.readLine() data2[i] data2 i br.readLine() br.readLine br for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            } int i = 0; int i = 0; i 0 i < row i row i++ i++ i {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            } {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            } for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                } int j = 0; int j = 0; j 0 j < column j column j++ j++ j {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                } {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                } sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]) sum sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]) sum Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]) Integer.parseInt(data[i][j]) Integer.parseInt Integer data[i][j] data[i] data i j Integer.parseInt(data2[j]) Integer.parseInt Integer data2[j] data2 j System.out.printf("%d\n", sum) System.out.printf System.out System System.out "%d\n" sum sum = 0 sum 0 String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        try {
            String inputData[] = br.readLine().split(" ");
            int sum = 0;
            int row = Integer.parseInt(inputData[0]), column = Integer.parseInt(inputData[1]);
            String data[][] = new String[row][column];
            String data2[] = new String[column];
            // data
            for (int i = 0; i < row; i++) {
                data[i] = br.readLine().split(" ");
            }
            // data2
            for (int i = 0; i < column; i++)
                data2[i] = br.readLine();

            for (int i = 0; i < row; i++) {
                for (int j = 0; j < column; j++) {
                    sum = sum + Integer.parseInt(data[i][j]) * Integer.parseInt(data2[j]);
                }
                System.out.printf("%d\n", sum);
                sum = 0;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
