import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	}

}
 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	}

} Main public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	} main {
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	} BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); input new BufferedReader (new InputStreamReader (System.in)) String[] nANDmStr = input.readLine().split(" "); nANDmStr input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " int[] nANDm = new int[nANDmStr.length]; nANDm new int[nANDmStr.length] nANDmStr.length nANDmStr nANDmStr.length for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		} int insert = 0; int insert = 0; insert 0 insert < nANDmStr.length insert nANDmStr.length nANDmStr nANDmStr.length insert++ insert++ insert {
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		} {
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		} nANDm[insert] = Integer.parseInt(nANDmStr[insert]) nANDm[insert] nANDm insert Integer.parseInt(nANDmStr[insert]) Integer.parseInt Integer nANDmStr[insert] nANDmStr insert int[][] matrix = new int[nANDm[0]][nANDm[1]]; matrix new int[nANDm[0]][nANDm[1]] nANDm[0] nANDm 0 nANDm[1] nANDm 1 for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		} int row = 0; int row = 0; row 0 row < matrix.length row matrix.length matrix matrix.length row++ row++ row {
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		} {
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		} String[] matrixStr = input.readLine().split(" "); matrixStr input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			} int column = 0; int column = 0; column 0 column < matrixStr.length column matrixStr.length matrixStr matrixStr.length column++ column++ column {
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			} {
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			} matrix[row][column] = Integer.parseInt(matrixStr[column]) matrix[row][column] matrix[row] matrix row column Integer.parseInt(matrixStr[column]) Integer.parseInt Integer matrixStr[column] matrixStr column String[] vectorStr = new String[nANDm[1]]; vectorStr new String[nANDm[1]] nANDm[1] nANDm 1 int[] vector = new int[vectorStr.length]; vector new int[vectorStr.length] vectorStr.length vectorStr vectorStr.length for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		} int insert = 0; int insert = 0; insert 0 insert < vector.length insert vector.length vector vector.length insert++ insert++ insert {
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		} {
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		} vectorStr[insert] = input.readLine() vectorStr[insert] vectorStr insert input.readLine() input.readLine input vector[insert] = Integer.parseInt(vectorStr[insert]) vector[insert] vector insert Integer.parseInt(vectorStr[insert]) Integer.parseInt Integer vectorStr[insert] vectorStr insert for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		} int row = 0; int row = 0; row 0 row < nANDm[0] row nANDm[0] nANDm 0 row++ row++ row {
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		} {
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		} int solution = 0; solution 0 for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			} int column = 0; int column = 0; column 0 column < nANDm[1] column nANDm[1] nANDm 1 column++ column++ column {
				solution = matrix[row][column] * vector[column] + solution;
			} {
				solution = matrix[row][column] * vector[column] + solution;
			} solution = matrix[row][column] * vector[column] + solution solution matrix[row][column] * vector[column] + solution matrix[row][column] * vector[column] matrix[row][column] matrix[row] matrix row column vector[column] vector column solution System.out.println(solution) System.out.println System.out System System.out solution String[] args args public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	}

} public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		String[] nANDmStr = input.readLine().split(" ");
		
		int[] nANDm = new int[nANDmStr.length];
		
		for(int insert = 0; insert < nANDmStr.length; insert++)
		{
			nANDm[insert] = Integer.parseInt(nANDmStr[insert]);
		}
		
		int[][] matrix = new int[nANDm[0]][nANDm[1]];
		
		for(int row = 0; row < matrix.length; row++)
		{
			String[] matrixStr = input.readLine().split(" ");
			
			for(int column = 0; column < matrixStr.length; column++)
			{
				matrix[row][column] = Integer.parseInt(matrixStr[column]);
			}
		}

		
		String[] vectorStr = new String[nANDm[1]];
		
		int[] vector = new int[vectorStr.length];
		
		for(int insert = 0; insert < vector.length; insert++)
		{
			vectorStr[insert] = input.readLine();
			
			vector[insert] = Integer.parseInt(vectorStr[insert]);
		}
		
		for(int row = 0; row < nANDm[0]; row++)
		{
			int solution = 0;
			
			for(int column = 0; column < nANDm[1]; column++)
			{
				solution = matrix[row][column] * vector[column] + solution;
			}
			
			System.out.println(solution);
		}
	}

}

