import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str; str int i i j j sum; sum int[] num = new int[2]; num new int[2] 2 int[][] a; a int[] b; b str = scan.nextLine() str scan.nextLine() scan.nextLine scan String[] x = str.split(" ", 0); x str.split(" ", 0) str.split str " " 0 num[0] = Integer.valueOf(x[0]) num[0] num 0 Integer.valueOf(x[0]) Integer.valueOf Integer x[0] x 0 num[1] = Integer.valueOf(x[1]) num[1] num 1 Integer.valueOf(x[1]) Integer.valueOf Integer x[1] x 1 a = new int[num[0]][num[1]] a new int[num[0]][num[1]] num[0] num 0 num[1] num 1 b = new int[num[1]] b new int[num[1]] num[1] num 1 for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        } i = 0; i = 0 i 0 i < num[0] i num[0] num 0 i++ i++ i {
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        } {
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        } str = scan.nextLine() str scan.nextLine() scan.nextLine scan x = str.split(" ", 0) x str.split(" ", 0) str.split str " " 0 for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            } j = 0; j = 0 j 0 j < num[1] j num[1] num 1 j++ j++ j {
                a[i][j] = Integer.valueOf(x[j]);
            } {
                a[i][j] = Integer.valueOf(x[j]);
            } a[i][j] = Integer.valueOf(x[j]) a[i][j] a[i] a i j Integer.valueOf(x[j]) Integer.valueOf Integer x[j] x j for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        } j = 0; j = 0 j 0 j < num[1] j num[1] num 1 j++ j++ j {
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        } {
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        } str = scan.nextLine() str scan.nextLine() scan.nextLine scan b[j] = Integer.valueOf(str) b[j] b j Integer.valueOf(str) Integer.valueOf Integer str sum = 0 sum 0 for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        } i = 0; i = 0 i 0 i < num[0] i num[0] num 0 i++ i++ i {
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        } {
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        } for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            } j = 0; j = 0 j 0 j < num[1] j num[1] num 1 j++ j++ j {
                sum += a[i][j] * b[j];
            } {
                sum += a[i][j] * b[j];
            } sum += a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(sum) System.out.println System.out System System.out sum sum = 0 sum 0 scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str;
        int i,j,sum;
        int[] num = new int[2];
        int[][] a;
        int[] b;
        str = scan.nextLine();
        String[] x = str.split(" ", 0);
        num[0] = Integer.valueOf(x[0]);
        num[1] = Integer.valueOf(x[1]);
        a = new int[num[0]][num[1]];
        b = new int[num[1]];
        for(i = 0; i < num[0]; i++){
            str = scan.nextLine();
            x = str.split(" ", 0);
            for(j = 0; j < num[1]; j++){
                a[i][j] = Integer.valueOf(x[j]);
            }
        }
        for(j = 0; j < num[1]; j++){
            str = scan.nextLine();
            b[j] = Integer.valueOf(str);
        }
        sum = 0;
        for(i = 0; i < num[0]; i++){
            for(j = 0; j < num[1]; j++){
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
            sum = 0;
        }
        
        scan.close();
    }
}
