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]);
		}
		
	}
} import java.util.Scanner; Scanner java.util 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]);
		}
		
	}
} 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]);
		}
		
	} main {
		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]);
		}
		
	} int n n m; m int cal; cal Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n=scan.nextInt() n scan.nextInt() scan.nextInt scan m=scan.nextInt() m scan.nextInt() scan.nextInt scan int[][] yousoA =new int[n][m]; yousoA new int[n][m] n m int[] yousob =new int[m]; yousob new int[m] m int[] yousoc =new int[n]; yousoc new int[n] n for(int i=0;i<n;i++)
		{
			for(int j=0;j<m;j++) {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0;j<m;j++) {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			}
		} {
			for(int j=0;j<m;j++) {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			}
		} for(int j=0;j<m;j++) {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			} {
			cal=scan.nextInt();
			yousoA[i][j]=cal;
			} cal=scan.nextInt() cal scan.nextInt() scan.nextInt scan yousoA[i][j]=cal yousoA[i][j] yousoA[i] yousoA i j cal for(int i=0;i<m;i++)
		{
			cal=scan.nextInt();
			yousob[i]=cal;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			cal=scan.nextInt();
			yousob[i]=cal;
		} {
			cal=scan.nextInt();
			yousob[i]=cal;
		} cal=scan.nextInt() cal scan.nextInt() scan.nextInt scan yousob[i]=cal yousob[i] 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]);
		} int i=0; int i=0; i 0 i<n i n i++ i++ 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]);
		} {
			cal=0;
			for(int j=0;j<m;j++)
				cal=cal+yousoA[i][j]*yousob[j];
			yousoc[i]=cal;
			System.out.println(yousoc[i]);
		} cal=0 cal 0 for(int j=0;j<m;j++)
				cal=cal+yousoA[i][j]*yousob[j]; int j=0; int j=0; j 0 j<m j m j++ j++ j cal=cal+yousoA[i][j]*yousob[j]; cal=cal+yousoA[i][j]*yousob[j] cal cal+yousoA[i][j]*yousob[j] cal yousoA[i][j]*yousob[j] yousoA[i][j] yousoA[i] yousoA i j yousob[j] yousob j yousoc[i]=cal yousoc[i] yousoc i cal System.out.println(yousoc[i]) System.out.println System.out System System.out yousoc[i] yousoc i String[] args args 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]);
		}
		
	}
} 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]);
		}
		
	}
} Main
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]);
		}
		
	}
}