import java.util.Scanner;
public class Main {
    public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	}
} Main public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	} main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int[][] gyoretu = new int[n][m]; gyoretu new int[n][m] n m int[] beku = new int[n]; beku new int[n] n for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		} {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		} for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				gyoretu[i][j] = scanner.nextInt();
			} {
				gyoretu[i][j] = scanner.nextInt();
			} gyoretu[i][j] = scanner.nextInt() gyoretu[i][j] gyoretu[i] gyoretu i j scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		} {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		} int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				beku[j] += gyoretu[j][i]*b;
			} {
				beku[j] += gyoretu[j][i]*b;
			} beku[j] += gyoretu[j][i]*b beku[j] beku j gyoretu[j][i]*b gyoretu[j][i] gyoretu[j] gyoretu j i b for (int C : beku) {
			System.out.println(C);
		} int C beku {
			System.out.println(C);
		} {
			System.out.println(C);
		} System.out.println(C) System.out.println System.out System System.out C String[] defargs defargs public class Main {
    public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	}
} public class Main {
    public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	}
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] defargs) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] gyoretu = new int[n][m];
		int[] beku = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				gyoretu[i][j] = scanner.nextInt();
			}
		}
		for (int i = 0; i < m; i++) {
			int b = scanner.nextInt();
			for (int j=0; j<n; j++) {
				beku[j] += gyoretu[j][i]*b;
			}
		}
		for (int C : beku) {
			System.out.println(C);
		}
	}
}

