import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    }
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    } main {
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int maxrow maxrow maxcol; maxcol maxrow = scanner.nextInt() maxrow scanner.nextInt() scanner.nextInt scanner maxcol = scanner.nextInt() maxcol scanner.nextInt() scanner.nextInt scanner int[][] a = new int[maxrow][maxcol]; a new int[maxrow][maxcol] maxrow maxcol for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < maxrow i maxrow i++ i++ i {
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        } {
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        } for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            } int ii = 0; int ii = 0; ii 0 ii < maxcol ii maxcol ii++ ii++ ii {
                a[i][ii] = scanner.nextInt();
            } {
                a[i][ii] = scanner.nextInt();
            } a[i][ii] = scanner.nextInt() a[i][ii] a[i] a i ii scanner.nextInt() scanner.nextInt scanner int[] b = new int[maxcol]; b new int[maxcol] maxcol for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < maxcol i maxcol i++ i++ i {
            b[i] = scanner.nextInt();
        } {
            b[i] = scanner.nextInt();
        } b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner int sum = 0; sum 0 for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        } int row = 0; int row = 0; row 0 row < maxrow row maxrow row++ row++ row {
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        } {
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        } sum = 0 sum 0 for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            } int col = 0; int col = 0; col 0 col < maxcol col maxcol col++ col++ col {
                sum += (a[row][col] * b[col]);
            } {
                sum += (a[row][col] * b[col]);
            } sum += (a[row][col] * b[col]) sum (a[row][col] * b[col]) a[row][col] a[row] a row col b[col] b col System.out.println(sum) System.out.println System.out System System.out sum scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int maxrow, maxcol;

        maxrow = scanner.nextInt();
        maxcol = scanner.nextInt();

        int[][] a = new int[maxrow][maxcol];

        for(int i = 0; i < maxrow; i++){
            for(int ii = 0; ii < maxcol; ii++){
                a[i][ii] = scanner.nextInt();
            }
        }

        int[] b = new int[maxcol];

        for(int i = 0; i < maxcol; i++){
            b[i] = scanner.nextInt();
        }

        int sum = 0;
        for(int row = 0; row < maxrow; row++){
            sum = 0;
            for(int col = 0; col < maxcol; col++){
                sum += (a[row][col] * b[col]);
            }
            System.out.println(sum);
        }

        scanner.close();
    }
}

