import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	}
} Main public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strs = br.readLine().split(" "); strs br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(strs[0]); n Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int m = Integer.parseInt(strs[1]); m Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 1 int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m String[] buf = new String[m]; buf new String[m] m for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		} int row=0; int row=0; row 0 row<n row n row++ row++ row {
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		} {
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		} buf = br.readLine().split(" ") buf br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			} int col=0; int col=0; col 0 col<m col m col++ col++ col {
				a[row][col] = Integer.parseInt(buf[col]);
			} {
				a[row][col] = Integer.parseInt(buf[col]);
			} a[row][col] = Integer.parseInt(buf[col]) a[row][col] a[row] a row col Integer.parseInt(buf[col]) Integer.parseInt Integer buf[col] buf col for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine()); int col=0; int col=0; col 0 col<m col m col++ col++ col b[col] = Integer.parseInt(br.readLine()); b[col] = Integer.parseInt(br.readLine()) b[col] b col Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] c = new int[n]; c new int[n] n for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		} int row=0; int row=0; row 0 row<n row n row++ row++ row {
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		} {
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		} for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			} int col=0; int col=0; col 0 col<m col m col++ col++ col {
				c[row] += a[row][col] * b[col];
			} {
				c[row] += a[row][col] * b[col];
			} c[row] += a[row][col] * b[col] c[row] c row a[row][col] * b[col] a[row][col] a[row] a row col b[col] b col for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		} int row=0; int row=0; row 0 row<n row n row++ row++ row {
			System.out.println(c[row]);
		} {
			System.out.println(c[row]);
		} System.out.println(c[row]) System.out.println System.out System System.out c[row] c row String[] args args public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	}
} public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		??????A????????°??¨?????°?????????
		String[] strs = br.readLine().split(" ");
		int n = Integer.parseInt(strs[0]);
		int m = Integer.parseInt(strs[1]);
//		??\??????????????°??????????????????A??¨B?????????
		int[][] a = new int[n][m];
		int[] b = new int[m];
		
		String[] buf = new String[m];
//		??????A
		for(int row=0; row<n; row++)
		{
			buf = br.readLine().split(" ");
			for(int col=0; col<m; col++)
			{
				a[row][col] = Integer.parseInt(buf[col]);
			}
		}
//		?¬????B
		for(int col=0; col<m; col++)	b[col] = Integer.parseInt(br.readLine());
//		A*B????????????C???????´?
		int[] c = new int[n];
		for(int row=0; row<n; row++)
		{
			for(int col=0; col<m; col++)
			{
				c[row] += a[row][col] * b[col];
			}
		}
//		C?????????????????????
		for(int row=0; row<n; row++)
		{
			System.out.println(c[row]);
		}
	}
}