import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

}
 import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String num = scan.nextLine(); num scan.nextLine() scan.nextLine scan int n = Integer.parseInt(num.split(" ")[0]); n Integer.parseInt(num.split(" ")[0]) Integer.parseInt Integer num.split(" ")[0] num.split(" ") num.split num " " 0 int m = Integer.parseInt(num.split(" ")[1]); m Integer.parseInt(num.split(" ")[1]) Integer.parseInt Integer num.split(" ")[1] num.split(" ") num.split num " " 1 int j = 0; j 0 int[][] A = new int[n][m]; A new int[n][m] n m String tmp; tmp while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        } j < n j n {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        } tmp = scan.nextLine() tmp scan.nextLine() scan.nextLine scan for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            } {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            } A[j][i] = Integer.parseInt(tmp.split(" ")[i]) A[j][i] A[j] A j i Integer.parseInt(tmp.split(" ")[i]) Integer.parseInt Integer tmp.split(" ")[i] tmp.split(" ") tmp.split tmp " " i j++ j j = 0 j 0 int[] b = new int[m]; b new int[m] m while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        } j < m j m {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        } tmp = scan.nextLine() tmp scan.nextLine() scan.nextLine scan b[j] = Integer.parseInt(tmp) b[j] b j Integer.parseInt(tmp) Integer.parseInt Integer tmp j++ j int[] sum = new int[n]; sum new int[n] n for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        } {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        } for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            } int q = 0; int q = 0; q 0 q < m q m q++ q++ q {
                sum[i] += A[i][q] * b[q];
            } {
                sum[i] += A[i][q] * b[q];
            } sum[i] += A[i][q] * b[q] sum[i] sum i A[i][q] * b[q] A[i][q] A[i] A i q b[q] b q for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(sum[i]);
        } {
            System.out.println(sum[i]);
        } System.out.println(sum[i]) System.out.println System.out System System.out sum[i] sum i String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String num = scan.nextLine();
        int n = Integer.parseInt(num.split(" ")[0]);
        int m = Integer.parseInt(num.split(" ")[1]);
        int j = 0;
        int[][] A = new int[n][m];
        String tmp;
        while (j < n) {
            tmp = scan.nextLine();
            for (int i = 0; i < m; i++) {
                A[j][i] = Integer.parseInt(tmp.split(" ")[i]);
                // System.out.println(Integer.parseInt(tmp.split(" ")[i]));
            }
            j++;
        }
        j = 0;
        int[] b = new int[m];
        while (j < m) {
            tmp = scan.nextLine();
            b[j] = Integer.parseInt(tmp);
            j++;
        }

        int[] sum = new int[n];

        for (int i = 0; i < n; i++) {
            for (int q = 0; q < m; q++) {
                sum[i] += A[i][q] * b[q];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(sum[i]);
        }
    }

}

