import java.util.Scanner;


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


public class Main {
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		int h = scanner.nextInt();
		int w = scanner.nextInt();
		
		int[][] a = new int[h][w];
		int[] b = new int[w];
		
		int c[] = new int[h];
		
		for(int i=0; i<h; i++)
		{
			for(int j=0; j<w; j++)
			{
				a[i][j] = scanner.nextInt();
			}
		}
		
		for(int i=0; i<w; i++)
		{
			b[i] = scanner.nextInt();
		}
		
		for(int i=0; i<h; i++)
		{
			c[i] = 0;
			for(int j=0; j<w; j++)
			{
				c[i] += a[i][j]*b[j];
			}
		}
		
		for(int i=0; i<h; i++)
		{
			System.out.println(c[i]);
		}
	}
}