import java.io.IOException;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {

		Scanner scane = new Scanner(System.in);

		int n = scane.nextInt();

		int m = scane.nextInt();

		int[][]  A = new int[n][m];

		int[] b = new int[m];

		int[] c = new int[n];

		for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		}
		for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		}



		for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		}

		for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		}


	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) throws IOException {

		Scanner scane = new Scanner(System.in);

		int n = scane.nextInt();

		int m = scane.nextInt();

		int[][]  A = new int[n][m];

		int[] b = new int[m];

		int[] c = new int[n];

		for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		}
		for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		}



		for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		}

		for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		}


	}
} Main public static void main(String[] args) throws IOException {

		Scanner scane = new Scanner(System.in);

		int n = scane.nextInt();

		int m = scane.nextInt();

		int[][]  A = new int[n][m];

		int[] b = new int[m];

		int[] c = new int[n];

		for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		}
		for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		}



		for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		}

		for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		}


	} main {

		Scanner scane = new Scanner(System.in);

		int n = scane.nextInt();

		int m = scane.nextInt();

		int[][]  A = new int[n][m];

		int[] b = new int[m];

		int[] c = new int[n];

		for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		}
		for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		}



		for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		}

		for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		}


	} Scanner scane = new Scanner(System.in); scane new Scanner(System.in) int n = scane.nextInt(); n scane.nextInt() scane.nextInt scane int m = scane.nextInt(); m scane.nextInt() scane.nextInt scane int[][]  A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		} int i=0; int i=0; i 0 i<A.length i A.length A A.length i++ i++ i {
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		} {
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		} for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			} int j = 0; int j = 0; j 0 j<A[0].length j A[0].length A[0] A 0 A[0].length j++ j++ j {

				A[i][j] = scane.nextInt();
			} {

				A[i][j] = scane.nextInt();
			} A[i][j] = scane.nextInt() A[i][j] A[i] A i j scane.nextInt() scane.nextInt scane for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		} int i= 0; int i= 0; i 0 i<A[0].length i A[0].length A[0] A 0 A[0].length i++ i++ i {
			b[i] = scane.nextInt();
		} {
			b[i] = scane.nextInt();
		} b[i] = scane.nextInt() b[i] b i scane.nextInt() scane.nextInt scane for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		} int i=0; int i=0; i 0 i<A.length i A.length A A.length i++ i++ i {
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		} {
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		} int sum =0; sum 0 for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			} int j = 0; int j = 0; j 0 j<A[0].length j A[0].length A[0] A 0 A[0].length 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 c[i] = sum c[i] c i sum for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		} int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args
import java.io.IOException;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {

		Scanner scane = new Scanner(System.in);

		int n = scane.nextInt();

		int m = scane.nextInt();

		int[][]  A = new int[n][m];

		int[] b = new int[m];

		int[] c = new int[n];

		for(int i=0; i<A.length; i++){
			for(int j = 0; j<A[0].length; j++){

				A[i][j] = scane.nextInt();
			}
		}
		for(int i= 0; i<A[0].length; i++){
			b[i] = scane.nextInt();
		}



		for(int i=0; i<A.length; i++){
			int sum =0;
			for(int j = 0; j<A[0].length; j++){
				sum += A[i][j]*b[j];
			}

			c[i] = sum;
		}

		for(int i=0; i<c.length; i++){
			System.out.println(c[i]);
		}


	}
}