import java.io.ByteArrayInputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    }
}
 import java.io.ByteArrayInputStream; ByteArrayInputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    }
} Main String INPUT = ""; INPUT "" public static void main(String[] args) throws Exception {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    } run {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    } Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes())); sc INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes())) INPUT.isEmpty() INPUT.isEmpty INPUT new Scanner(System.in) new Scanner(new ByteArrayInputStream(INPUT.getBytes())) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) solve(sc, out) solve sc out out.flush() out.flush out void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    } solve {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    } int n n m; m n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc int A[][] = new int[n][m]; A new int[n][m] n m int b[] = new int[m]; b new int[m] m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		} 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] = sc.nextInt();
			}
		} {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m 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 (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = sc.nextInt();
		} {
			b[i] = sc.nextInt();
		} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		} {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		} int a = 0; a 0 for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a += A[i][j]*b[j];
			} {
				a += A[i][j]*b[j];
			} a += A[i][j]*b[j] a A[i][j]*b[j] A[i][j] A[i] A i j b[j] b j System.out.println(a) System.out.println System.out System System.out a Scanner sc sc PrintWriter out out public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    }
} public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    }
} Main
import java.io.ByteArrayInputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    String INPUT = "";

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    void run() {
        Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));
        PrintWriter out = new PrintWriter(System.out);

        solve(sc, out);
        out.flush();
    }

    void solve(Scanner sc, PrintWriter out) {
        int n, m;
        
        n = sc.nextInt();
        m = sc.nextInt();
        
        int A[][] = new int[n][m];
        int b[] = new int[m];
        
        for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
        	int a = 0;
			for (int j = 0; j < m; j++) {
				a += A[i][j]*b[j];
			}
			System.out.println(a);
		}
    }
}

