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

        short n = scanner.nextShort();
        short m = scanner.nextShort();

        short[][] a = new short[n][m];
        short[]   b = new short[m];

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        }

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

        int x = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        }

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

        short n = scanner.nextShort();
        short m = scanner.nextShort();

        short[][] a = new short[n][m];
        short[]   b = new short[m];

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        }

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

        int x = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        }

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

        short n = scanner.nextShort();
        short m = scanner.nextShort();

        short[][] a = new short[n][m];
        short[]   b = new short[m];

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        }

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

        int x = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        }

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

        short n = scanner.nextShort();
        short m = scanner.nextShort();

        short[][] a = new short[n][m];
        short[]   b = new short[m];

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        }

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

        int x = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        }

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) short n = scanner.nextShort(); n scanner.nextShort() scanner.nextShort scanner short m = scanner.nextShort(); m scanner.nextShort() scanner.nextShort scanner short[][] a = new short[n][m]; a new short[n][m] n m short[]   b = new short[m]; b new short[m] m for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        } {
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        } for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a[i][j] = scanner.nextShort();
            } {
                a[i][j] = scanner.nextShort();
            } a[i][j] = scanner.nextShort() a[i][j] a[i] a i j scanner.nextShort() scanner.nextShort scanner for(int i = 0; i < m; i++){
            b[i] = scanner.nextShort();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            b[i] = scanner.nextShort();
        } {
            b[i] = scanner.nextShort();
        } b[i] = scanner.nextShort() b[i] b i scanner.nextShort() scanner.nextShort scanner int x = 0; x 0 for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        } {
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        } for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                x += a[i][j]*b[j];
            } {
                x += a[i][j]*b[j];
            } x += a[i][j]*b[j] x a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.println(x) System.out.println System.out System System.out x x = 0 x 0 String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        short n = scanner.nextShort();
        short m = scanner.nextShort();

        short[][] a = new short[n][m];
        short[]   b = new short[m];

        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                a[i][j] = scanner.nextShort();
            }
        }

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

        int x = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                x += a[i][j]*b[j];
            }
            System.out.println(x);
            x = 0;
        }

    }
}

