import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    }

    public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    }

    public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    }
} Main public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    } main {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) int rows = inp.nextInt(); rows inp.nextInt() inp.nextInt inp int cols = inp.nextInt(); cols inp.nextInt() inp.nextInt inp int aMatrix[][] = new int[rows][cols]; aMatrix new int[rows][cols] rows cols int bMatrix[][] = new int[cols][1]; bMatrix new int[cols][1] cols 1 for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        } int k = 0; int k = 0; k 0 k < rows k rows k++ k++ k {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        } {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        } for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            } int j = 0; int j = 0; j 0 j < cols j cols j++ j++ j {
                aMatrix[k][j] = inp.nextInt();
            } {
                aMatrix[k][j] = inp.nextInt();
            } aMatrix[k][j] = inp.nextInt() aMatrix[k][j] aMatrix[k] aMatrix k j inp.nextInt() inp.nextInt inp for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        } int j = 0; int j = 0; j 0 j < cols j cols j++ j++ j {
            bMatrix[j][0] = inp.nextInt();
        } {
            bMatrix[j][0] = inp.nextInt();
        } bMatrix[j][0] = inp.nextInt() bMatrix[j][0] bMatrix[j] bMatrix j 0 inp.nextInt() inp.nextInt inp int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols); total matrixCalc(aMatrix, bMatrix, rows, cols) matrixCalc aMatrix bMatrix rows cols for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        } int[] item total {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        } {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        } for (int secondItem : item) {
                System.out.println(secondItem);
            } int secondItem item {
                System.out.println(secondItem);
            } {
                System.out.println(secondItem);
            } System.out.println(secondItem) System.out.println System.out System System.out secondItem String[] args args public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    } matrixCalc {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    } int totals[][] = new int[rows][1]; totals new int[rows][1] rows 1 for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        } int k = 0; int k = 0; k 0 k < rows k rows k++ k++ k {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        } {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        } int total = 0; total 0 for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            } int j = 0; int j = 0; j 0 j < cols j cols j++ j++ j {
                total += aMatrix[k][j] * bMatrix[j][0];
            } {
                total += aMatrix[k][j] * bMatrix[j][0];
            } total += aMatrix[k][j] * bMatrix[j][0] total aMatrix[k][j] * bMatrix[j][0] aMatrix[k][j] aMatrix[k] aMatrix k j bMatrix[j][0] bMatrix[j] bMatrix j 0 totals[k][0] = total totals[k][0] totals[k] totals k 0 total return totals; totals int[][] aMatrix aMatrix int[][] bMatrix bMatrix int rows rows int cols cols public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    }

    public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    }

    public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);
        int rows = inp.nextInt();
        int cols = inp.nextInt();

        int aMatrix[][] = new int[rows][cols];
        int bMatrix[][] = new int[cols][1];


        for (int k = 0; k < rows; k++) {
            for (int j = 0; j < cols; j++) {
                aMatrix[k][j] = inp.nextInt();
            }
        }

        for (int j = 0; j < cols; j++) {
            bMatrix[j][0] = inp.nextInt();
        }

        int total[][] = matrixCalc(aMatrix, bMatrix, rows, cols);
        for (int[] item : total) {
            for (int secondItem : item) {
                System.out.println(secondItem);
            }
        }
    }

    public static int[][] matrixCalc(int[][] aMatrix, int[][] bMatrix, int rows, int cols) {
        int totals[][] = new int[rows][1];
        for (int k = 0; k < rows; k++) {
            int total = 0;
            for (int j = 0; j < cols; j++) {
                total += aMatrix[k][j] * bMatrix[j][0];
            }

            totals[k][0] = total;
        }

        return totals;
    }
}

