import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	} main {
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	} int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int[] b = new int[m]; b new int[m] m int[][] A = new int[n][m]; A new int[n][m] n m int[] c = new int[n]; c new int[n] n for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.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] = scan.nextInt();
			}
		} {
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		} for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				A[i][j] = scan.nextInt();
			} {
				A[i][j] = scan.nextInt();
			} A[i][j] = scan.nextInt() A[i][j] A[i] A i j scan.nextInt() scan.nextInt scan for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = scan.nextInt();
		} {
			b[i] = scan.nextInt();
		} b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		} {
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		} for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c[i] += A[i][j] * b[j];
			} {
				c[i] += A[i][j] * b[j];
			} c[i] += A[i][j] * b[j] c[i] c i A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j System.out.printf("%d\n", c[i]) System.out.printf System.out System System.out "%d\n" c[i] c i String[] args args public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] b = new int[m];
		int[][] A = new int[n][m];
		int[] c = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				A[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i < m; i++){
			b[i] = scan.nextInt();
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				c[i] += A[i][j] * b[j];
			}
			System.out.printf("%d\n", c[i]);
		}
	}
}