import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int n,m;
		int cal;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		m=scan.nextInt();
		int[][] yousoA =new int[n][m];
		int[] yousob =new int[m];
		int[] yousoc =new int[n];
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<m;j++) {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			}
		}
		for(int i=0;i<m;i++)
		{
			cal=scan.nextInt();
			yousob[i]=cal;
		}
		for(int i=0;i<n;i++)
		{
			cal=0;
			for(int j=0;j<m;j++)
				cal=cal+yousoA[i][j]*yousob[j];
			yousoc[i]=cal;
			System.out.println(yousoc[i]);
		}
		
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz