import java.util.ArrayList;
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    }
} Main public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    } main {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    } int n n m m A[][] A i i j j c c a = 1 a 1 cnt; cnt Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> b = new ArrayList<Integer>(); b new ArrayList<Integer>() n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc A = new int[n][m] A new int[n][m] n m for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        } i = 0; i = 0 i 0 n  > i n i i++ i++ i {
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        } {
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        } for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            } j = 0; j = 0 j 0 m > j m j j++ j++ j {
                A[i][j] = sc.nextInt();
            } {
                A[i][j] = sc.nextInt();
            } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        } cnt = 0; cnt = 0 cnt 0 cnt < m cnt m cnt++ cnt++ cnt {
            a = sc.nextInt();
            b.add(new Integer(a));
        } {
            a = sc.nextInt();
            b.add(new Integer(a));
        } a = sc.nextInt() a sc.nextInt() sc.nextInt sc b.add(new Integer(a)) b.add b new Integer(a) for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        } i = 0; i = 0 i 0 n > i n i i++ i++ i {
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        } {
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        } c = 0 c 0 for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            } j = 0; j = 0 j 0 m > j m j j++ j++ j {
                c += b.get(new Integer(j)) * A[i][j];
            } {
                c += b.get(new Integer(j)) * A[i][j];
            } c += b.get(new Integer(j)) * A[i][j] c b.get(new Integer(j)) * A[i][j] b.get(new Integer(j)) b.get b new Integer(j) A[i][j] A[i] A i j System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
    public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    }
} public class Main {
    public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        int n, m, A[][], i, j, c, a = 1, cnt;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> b = new ArrayList<Integer>();
        n = sc.nextInt();
        m = sc.nextInt();
        A = new int[n][m];
         
        for(i = 0; n  > i; i++){
            for(j = 0; m > j; j++){
                A[i][j] = sc.nextInt();
            }
        }
         
        for(cnt = 0; cnt < m ; cnt++){
            a = sc.nextInt();
            b.add(new Integer(a));
        }
         
        for(i = 0; n > i ; i++){
            c = 0;
            for(j = 0;m > j; j++){
                c += b.get(new Integer(j)) * A[i][j];
            }
            System.out.println(c);
        }
    }
}