//???????????????????????????????????°??????

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

class Main {
	public static void main(String[] args) throws IOException{
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) throws IOException{
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	}

} Main public static void main(String[] args) throws IOException{
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	} main {
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	} BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int rowNum = Integer.parseInt(str[0]); rowNum Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int colNum = Integer.parseInt(str[1]); colNum Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int[][] arrayA = new int[rowNum][colNum]; arrayA new int[rowNum][colNum] rowNum colNum for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		} int i=0; int i=0; i 0 i<rowNum i rowNum i++ i++ i {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		} {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		} String[] arrayAStr = br.readLine().split(" "); arrayAStr br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			} int j=0; int j=0; j 0 j<colNum j colNum j++ j++ j {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			} {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			} arrayA[i][j]=Integer.parseInt(arrayAStr[j]) arrayA[i][j] arrayA[i] arrayA i j Integer.parseInt(arrayAStr[j]) Integer.parseInt Integer arrayAStr[j] arrayAStr j int[] arrayB = new int[colNum]; arrayB new int[colNum] colNum for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		} int i=0; int i=0; i 0 i<colNum i colNum i++ i++ i {
			arrayB[i] = Integer.parseInt(br.readLine());
		} {
			arrayB[i] = Integer.parseInt(br.readLine());
		} arrayB[i] = Integer.parseInt(br.readLine()) arrayB[i] arrayB i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		} int i=0; int i=0; i 0 i<rowNum i rowNum i++ i++ i {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		} {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		} int sum = 0; sum 0 for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			} int j=0; int j=0; j 0 j<colNum j colNum j++ j++ j {
				sum = sum +arrayA[i][j]*arrayB[j];
			} {
				sum = sum +arrayA[i][j]*arrayB[j];
			} sum = sum +arrayA[i][j]*arrayB[j] sum sum +arrayA[i][j]*arrayB[j] sum arrayA[i][j]*arrayB[j] arrayA[i][j] arrayA[i] arrayA i j arrayB[j] arrayB j System.out.println(sum) System.out.println System.out System System.out sum String[] args args
//???????????????????????????????????°??????

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

class Main {
	public static void main(String[] args) throws IOException{
		
		//??????????????????????????????????????°??¨?????°?????\???
		BufferedReader br =
				new BufferedReader(new InputStreamReader(System.in));
		
		String[] str = br.readLine().split(" ");
		int rowNum = Integer.parseInt(str[0]);
		int colNum = Integer.parseInt(str[1]);
		
		int[][] arrayA = new int[rowNum][colNum];			 //??????A?????????????´????????????????arrayA
		for(int i=0; i<rowNum; i++) {
			String[] arrayAStr = br.readLine().split(" ");
			for(int j=0; j<colNum; j++) {
				arrayA[i][j]=Integer.parseInt(arrayAStr[j]);
			}
		}
		
		int[] arrayB = new int[colNum];					//??????B?????????????´????????????????arrayB
		for(int i=0; i<colNum; i++) {
			arrayB[i] = Integer.parseInt(br.readLine());
		}
		
		for(int i=0; i<rowNum; i++) {
			int sum = 0;
			for(int j=0; j<colNum; j++) {
				sum = sum +arrayA[i][j]*arrayB[j];
			}
			//????????????
			System.out.println(sum);
		}

	}

}