import java.util.*;
import java.io.*;

class Main {
	static PrintStream out = System.out;
	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		int n = in.nextInt();
		int m = in.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] = in.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		}
	}
} import java.util.*; util.* java import java.io.*; io.* java class Main {
	static PrintStream out = System.out;
	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		int n = in.nextInt();
		int m = in.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] = in.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		}
	}
} Main static PrintStream out = System.out; out System.out System System.out static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void main(String[] args) {
		int n = in.nextInt();
		int m = in.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] = in.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		}
	} main {
		int n = in.nextInt();
		int m = in.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] = in.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		}
	} int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in 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] = in.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] = in.nextInt();
			}
		} {
			for(int j = 0; j < m; j++) {
				a[i][j] = in.nextInt();
			}
		} for(int j = 0; j < m; j++) {
				a[i][j] = in.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a[i][j] = in.nextInt();
			} {
				a[i][j] = in.nextInt();
			} a[i][j] = in.nextInt() a[i][j] a[i] a i j in.nextInt() in.nextInt in for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = in.nextInt();
		} {
			b[i] = in.nextInt();
		} b[i] = in.nextInt() b[i] b i in.nextInt() in.nextInt in for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		} {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		} long sum = 0; sum 0 for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m 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 out.println(sum) out.println out sum String[] args args
import java.util.*;
import java.io.*;

class Main {
	static PrintStream out = System.out;
	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		int n = in.nextInt();
		int m = in.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] = in.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for(int i = 0; i < n; i++) {
			long sum = 0;
			for(int j = 0; j < m; j++) {
				sum += a[i][j] * b[j];
			}
			out.println(sum);
		}
	}
}