import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	}

} import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
	
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	}

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

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	} main {
		Scanner sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] matrix = new int[n][m]; matrix new int[n][m] n m for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrix[i][j] = sc.nextInt();
			} {
				matrix[i][j] = sc.nextInt();
			} matrix[i][j] = sc.nextInt() matrix[i][j] matrix[i] matrix i j sc.nextInt() sc.nextInt sc int[] vector = new int[m]; vector new int[m] m for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vector[i] = sc.nextInt();
		} {
			vector[i] = sc.nextInt();
		} vector[i] = sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[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 += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		} {
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		} int sum = 0; sum 0 for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += matrix[i][j] * vector[j];
			} {
				sum += matrix[i][j] * vector[j];
			} sum += matrix[i][j] * vector[j] sum matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector 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 sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	}

} public class Main {
	
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	}

} Main
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		final int n = sc.nextInt();
		final int m = sc.nextInt();
		
		int[][] matrix = new int[n][m];
		
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				matrix[i][j] = sc.nextInt();
			}
		}
		
		int[] vector = new int[m];
		for(int i = 0; i < m; i++){
			vector[i] = sc.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			int sum = 0;
			
			for(int j = 0; j < m; j++){
				sum += matrix[i][j] * vector[j];
			}
			
			System.out.println(sum);
		}
		
		
		
		
	}

}