public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	} main {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) String[] data = sc.nextLine().split(" "); data sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(data[0]); n Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 int m = Integer.parseInt(data[1]); m Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 int[][] A = new int[n][m]; A new int[n][m] n m int[] v = new int[m]; v new int[m] m for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		} {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		} data = sc.nextLine().split(" ") data sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				A[i][j] = Integer.parseInt(data[j]);
			} {
				A[i][j] = Integer.parseInt(data[j]);
			} A[i][j] = Integer.parseInt(data[j]) A[i][j] A[i] A i j Integer.parseInt(data[j]) Integer.parseInt Integer data[j] data j for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			v[i] = sc.nextInt();
		} {
			v[i] = sc.nextInt();
		} v[i] = sc.nextInt() v[i] v i sc.nextInt() sc.nextInt sc for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		} int i=0; int i=0; i 0 i<n i n i++ i++ i {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		} {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		} int sum = 0; sum 0 for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				sum += A[i][j] * v[j];
			} {
				sum += A[i][j] * v[j];
			} sum += A[i][j] * v[j] sum A[i][j] * v[j] A[i][j] A[i] A i j v[j] v 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) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	}

} Main
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		String[] data = sc.nextLine().split(" ");
		int n = Integer.parseInt(data[0]);
		int m = Integer.parseInt(data[1]);

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

		for (int i=0; i<n; i++) {
			data = sc.nextLine().split(" ");

			for (int j=0; j<m; j++) {
				A[i][j] = Integer.parseInt(data[j]);
			}
		}

		for (int i=0; i<m; i++) {
			v[i] = sc.nextInt();
		}

		for (int i=0; i<n; i++) {

			int sum = 0;
			for (int j=0; j<m; j++) {
				sum += A[i][j] * v[j];
			}

			System.out.println(sum);

		}
	}

}