import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] matSize = in.readLine().split(" "); matSize in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(matSize[0]); n Integer.parseInt(matSize[0]) Integer.parseInt Integer matSize[0] matSize 0 int m = Integer.parseInt(matSize[1]); m Integer.parseInt(matSize[1]) Integer.parseInt Integer matSize[1] matSize 1 int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vectorB = new int[m]; vectorB new int[m] m for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i += 1 i += 1 i 1 {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		} {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		} String[] input = in.readLine().split(" "); input in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			} int j = 0; int j = 0; j 0 j < m j m j += 1 j += 1 j 1 {
				matrix[i][j] = Integer.parseInt(input[j]);
			} {
				matrix[i][j] = Integer.parseInt(input[j]);
			} matrix[i][j] = Integer.parseInt(input[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(input[j]) Integer.parseInt Integer input[j] input j for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		} int s = 0; int s = 0; s 0 s < m s m s += 1 s += 1 s 1 {
			vectorB[s] = Integer.parseInt(in.readLine());
		} {
			vectorB[s] = Integer.parseInt(in.readLine());
		} vectorB[s] = Integer.parseInt(in.readLine()) vectorB[s] vectorB s Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		} int t = 0; int t = 0; t 0 t < n t n t += 1 t += 1 t 1 {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		} {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		} int ans = 0; ans 0 for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			} int u = 0; int u = 0; u 0 u < m u m u += 1 u += 1 u 1 {
				ans += matrix[t][u] * vectorB[u];
			} {
				ans += matrix[t][u] * vectorB[u];
			} ans += matrix[t][u] * vectorB[u] ans matrix[t][u] * vectorB[u] matrix[t][u] matrix[t] matrix t u vectorB[u] vectorB u System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] matSize = in.readLine().split(" ");
		int n = Integer.parseInt(matSize[0]);
		int m = Integer.parseInt(matSize[1]);
		int[][] matrix = new int[n][m];
		int[] vectorB = new int[m];
		for (int i = 0; i < n; i += 1) {
			String[] input = in.readLine().split(" ");
			for (int j = 0; j < m; j += 1) {
				matrix[i][j] = Integer.parseInt(input[j]);
			}
		}
		for (int s = 0; s < m; s += 1) {
			vectorB[s] = Integer.parseInt(in.readLine());
		}
		for (int t = 0; t < n; t += 1) {
			int ans = 0;
			for (int u = 0; u < m; u += 1) {
				ans += matrix[t][u] * vectorB[u];
			}
			System.out.println(ans);
		}
	}
}