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

public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	}

} Main public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String[] nm = br.readLine().split(" "); nm br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(nm[0]); n Integer.parseInt(nm[0]) Integer.parseInt Integer nm[0] nm 0 int m = Integer.parseInt(nm[1]); m Integer.parseInt(nm[1]) Integer.parseInt Integer nm[1] nm 1 int[][] an = new int[n][m]; an new int[n][m] n m int[] bn = new int[m]; bn new int[m] m for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		} {
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		} String[] aninput = br.readLine().split(" "); aninput br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				an[i][j] = Integer.parseInt(aninput[j]);
			} {
				an[i][j] = Integer.parseInt(aninput[j]);
			} an[i][j] = Integer.parseInt(aninput[j]) an[i][j] an[i] an i j Integer.parseInt(aninput[j]) Integer.parseInt Integer aninput[j] aninput j for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		} {
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		} String bninput = br.readLine(); bninput br.readLine() br.readLine br bn[i] = Integer.parseInt(bninput) bn[i] bn i Integer.parseInt(bninput) Integer.parseInt Integer bninput for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		} {
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		} int sum = 0; sum 0 for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += an[i][j] * bn[j];
			} {
				sum += an[i][j] * bn[j];
			} sum += an[i][j] * bn[j] sum an[i][j] * bn[j] an[i][j] an[i] an i j bn[j] bn j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	}

} public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	}

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

public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        String[] nm = br.readLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        int[][] an = new int[n][m];
        int[] bn = new int[m];
		for (int i = 0; i < n; i++)
		{
			String[] aninput = br.readLine().split(" ");
			for (int j = 0; j < m; j++)
			{
				an[i][j] = Integer.parseInt(aninput[j]);
			}
		}
		for (int i = 0; i < m; i++)
		{
			String bninput = br.readLine();
			bn[i] = Integer.parseInt(bninput);
		}
		
		
		for (int i = 0; i < n; i++)
		{
			int sum = 0;
			for (int j = 0; j < m; j++)
			{
				sum += an[i][j] * bn[j];
			}
			System.out.println(sum);
		}
		
	}

}