
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int[][] list = new int[a][b]; list new int[a][b] a b for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		} {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		} for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			} int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
				list[i][j] = scanner.nextInt();
			} {
				list[i][j] = scanner.nextInt();
			} list[i][j] = scanner.nextInt() list[i][j] list[i] list i j scanner.nextInt() scanner.nextInt scanner int[] list2 = new int[b]; list2 new int[b] b for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			list2[i] = scanner.nextInt();
		} {
			list2[i] = scanner.nextInt();
		} list2[i] = scanner.nextInt() list2[i] list2 i scanner.nextInt() scanner.nextInt scanner int sum; sum for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		} {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		} sum = 0 sum 0 for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			} int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
				sum += list[i][j] * list2[j];
			} {
				sum += list[i][j] * list2[j];
			} sum += list[i][j] * list2[j] sum list[i][j] * list2[j] list[i][j] list[i] list i j list2[j] list2 j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		int[][] list = new int[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				list[i][j] = scanner.nextInt();
			}
		}
		int[] list2 = new int[b];
		for (int i = 0; i < b; i++) {
			list2[i] = scanner.nextInt();
		}
		int sum;
		for (int i = 0; i < a; i++) {
			sum = 0;
			for (int j = 0; j < b; j++) {
				sum += list[i][j] * list2[j];
			}
			System.out.println(sum);
		}

	}
}