import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int n,m;
        int result = 0;
        
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		int A[][] = new int[n][m];
		int b[]   = new int[m];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		}
    	scanner.close();
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        int n,m;
        int result = 0;
        
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		int A[][] = new int[n][m];
		int b[]   = new int[m];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		}
    	scanner.close();
    }
} Main public static void main(String[] args){
        int n,m;
        int result = 0;
        
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		int A[][] = new int[n][m];
		int b[]   = new int[m];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		}
    	scanner.close();
    } main {
        int n,m;
        int result = 0;
        
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		int A[][] = new int[n][m];
		int b[]   = new int[m];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		}
    	scanner.close();
    } int n n m; m int result = 0; result 0 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner m = scanner.nextInt() m scanner.nextInt() scanner.nextInt scanner int A[][] = new int[n][m]; A new int[n][m] n m int b[]   = new int[m]; b new int[m] m for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[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++){
				A[i][j] = scanner.nextInt();
			}
		} {
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		} for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				A[i][j] = scanner.nextInt();
			} {
				A[i][j] = scanner.nextInt();
			} A[i][j] = scanner.nextInt() A[i][j] A[i] A i j scanner.nextInt() scanner.nextInt scanner for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = scanner.nextInt();
		} {
			b[i] = scanner.nextInt();
		} b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		} {
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		} for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				result += A[i][j]*b[j];
			} {
				result += A[i][j]*b[j];
			} result += A[i][j]*b[j] result A[i][j]*b[j] A[i][j] A[i] A i j b[j] b j System.out.println(result) System.out.println System.out System System.out result result = 0 result 0 scanner.close() scanner.close scanner String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int n,m;
        int result = 0;
        
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		m = scanner.nextInt();
		int A[][] = new int[n][m];
		int b[]   = new int[m];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = scanner.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = scanner.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				result += A[i][j]*b[j];
			}
			System.out.println(result);
			result = 0;
		}
    	scanner.close();
    }
}