import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.InputMismatchException;


public class Main {

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

		void close() {
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.StreamTokenizer; StreamTokenizer java.io import java.util.InputMismatchException; InputMismatchException java.util public class Main {

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
			b[j] = sc.nextInt();
		} {
			b[j] = sc.nextInt();
		} b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += a[i][j] * b[j];
			}
			System.out.println(c);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += a[i][j] * b[j];
			}
			System.out.println(c);
		} {
			int c = 0;
			for (int j = 0; j < m; j++) {
				c += a[i][j] * b[j];
			}
			System.out.println(c);
		} int c = 0; c 0 for (int j = 0; j < m; j++) {
				c += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c += a[i][j] * b[j];
			} {
				c += a[i][j] * b[j];
			} c += a[i][j] * b[j] c a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(c) System.out.println System.out System System.out c sc.close() sc.close sc String[] args args private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

		void close() {
		}
	} Scanner InputStreamReader isr; isr BufferedReader br; br StreamTokenizer st; st private Scanner() {
		} Scanner {
		} Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		} Scanner {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		} isr = new InputStreamReader(in) isr new InputStreamReader(in) br = new BufferedReader(isr) br new BufferedReader(isr) st = new StreamTokenizer(br) st new StreamTokenizer(br) InputStream in in String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		} next {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		} try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			} catch (IOException e) {
				throw new IllegalStateException();
			} IOException e {
				throw new IllegalStateException();
			} throw new IllegalStateException(); new IllegalStateException() {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} if (st.nextToken() != StreamTokenizer.TT_WORD) {
				} st.nextToken() != StreamTokenizer.TT_WORD st.nextToken() st.nextToken st StreamTokenizer.TT_WORD StreamTokenizer StreamTokenizer.TT_WORD {
				} return st.sval; st.sval st st.sval int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		} nextInt {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		} try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			} catch (IOException e) {
				throw new IllegalStateException();
			} IOException e {
				throw new IllegalStateException();
			} throw new IllegalStateException(); new IllegalStateException() {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				} st.nextToken() != StreamTokenizer.TT_NUMBER st.nextToken() st.nextToken st StreamTokenizer.TT_NUMBER StreamTokenizer StreamTokenizer.TT_NUMBER {
					throw new InputMismatchException();
				} throw new InputMismatchException(); new InputMismatchException() return (int)st.nval; (int)st.nval st st.nval void close() {
		} close {
		} public class Main {

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

		void close() {
		}
	}
} public class Main {

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

		void close() {
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.InputMismatchException;


public class Main {

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

		int n = sc.nextInt();
		int 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 j = 0; j < m; j++) {
			b[j] = sc.nextInt();
		}

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

		sc.close();
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		InputStreamReader isr;
		BufferedReader br;
		StreamTokenizer st;

		private Scanner() {
		}

		Scanner (InputStream in) {
			isr = new InputStreamReader(in);
			br = new BufferedReader(isr);
			st = new StreamTokenizer(br);
		}

		String next() throws RuntimeException  {
			try {
				if (st.nextToken() != StreamTokenizer.TT_WORD) {
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return st.sval;
		}

		int nextInt() throws RuntimeException {
			try {
				if (st.nextToken() != StreamTokenizer.TT_NUMBER) {
					throw new InputMismatchException();
				}
			} catch (IOException e) {
				throw new IllegalStateException();
			}

			return (int)st.nval;
		}

		void close() {
		}
	}
}