import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int[][] arrayA = new int[n][m]; arrayA new int[n][m] n m int[] arrayB = new int[m]; arrayB new int[m] m for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		} {
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		} for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				arrayA[i][j] = scan.nextInt();
			} {
				arrayA[i][j] = scan.nextInt();
			} arrayA[i][j] = scan.nextInt() arrayA[i][j] arrayA[i] arrayA i j scan.nextInt() scan.nextInt scan for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i< m i m i++ i++ i {
			arrayB[i] = scan.nextInt();
		} {
			arrayB[i] = scan.nextInt();
		} arrayB[i] = scan.nextInt() arrayB[i] arrayB i scan.nextInt() scan.nextInt scan int intCount = 0; intCount 0 for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		} {
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		} intCount = 0 intCount 0 for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				intCount += arrayA[i][j] * arrayB[j];
			} {
				intCount += arrayA[i][j] * arrayB[j];
			} intCount += arrayA[i][j] * arrayB[j] intCount arrayA[i][j] * arrayB[j] arrayA[i][j] arrayA[i] arrayA i j arrayB[j] arrayB j System.out.println(intCount) System.out.println System.out System System.out intCount scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arrayA = new int[n][m];
		int[] arrayB = new int[m];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				arrayA[i][j] = scan.nextInt();
			}
		}
		for(int i = 0; i< m; i++){
			arrayB[i] = scan.nextInt();
		}
		int intCount = 0;
		for(int i = 0; i < n; i++){
			intCount = 0;
			for(int j = 0; j < m; j++){
				intCount += arrayA[i][j] * arrayB[j];
			}
			System.out.println(intCount);
		}
		scan.close();
	}
}