import java.io.*;
import java.io.IOException;

class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int  n
			,m;
		
		String[] input = new String[100];
		
		try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		}
		
	}
}
 import java.io.*; io.* java import java.io.IOException; IOException java.io class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int  n
			,m;
		
		String[] input = new String[100];
		
		try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		}
		
	}
} Main public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int  n
			,m;
		
		String[] input = new String[100];
		
		try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		}
		
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int  n
			,m;
		
		String[] input = new String[100];
		
		try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		}
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int  n n m; m String[] input = new String[100]; input new String[100] 100 try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		} catch(IOException e){
			System.out.println(e);
			return;
		} IOException e {
			System.out.println(e);
			return;
		} System.out.println(e) System.out.println System.out System System.out e return; {
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		} input = br.readLine().split("[\\s]+") input br.readLine().split("[\\s]+") br.readLine().split br.readLine() br.readLine br "[\\s]+" n = Integer.parseInt(input[0]) n Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 m = Integer.parseInt(input[1]) m Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			} {
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			} input = br.readLine().split("[\\s]+") input br.readLine().split("[\\s]+") br.readLine().split br.readLine() br.readLine br "[\\s]+" for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				} int j=0; int j=0; j 0 j<m j m j++ j++ j {
					A[i][j] = Integer.parseInt(input[j]);
				} {
					A[i][j] = Integer.parseInt(input[j]);
				} A[i][j] = Integer.parseInt(input[j]) A[i][j] A[i] A i j Integer.parseInt(input[j]) Integer.parseInt Integer input[j] input j for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				b[j] = Integer.parseInt(br.readLine());
			} {
				b[j] = Integer.parseInt(br.readLine());
			} b[j] = Integer.parseInt(br.readLine()) b[j] b j Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int c = 0; c 0 for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			} {
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			} for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				} int j=0; int j=0; j 0 j<m j m j++ j++ j {
					c += A[i][j] * b[j];
				} {
					c += A[i][j] * b[j];
				} c += A[i][j] * b[j] c A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j System.out.println(c) System.out.println System.out System System.out c c = 0 c 0 String args[] args
import java.io.*;
import java.io.IOException;

class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int  n
			,m;
		
		String[] input = new String[100];
		
		try{
			//n,mの入力
			input = br.readLine().split("[\\s]+");
			n = Integer.parseInt(input[0]);
			m = Integer.parseInt(input[1]);
			
			int[][] A = new int[n][m]; 
			int[] b = new int[m];
			
			//Aの入力
			for(int i=0;i<n;i++){
				input = br.readLine().split("[\\s]+");
				for(int j=0;j<m;j++){
					A[i][j] = Integer.parseInt(input[j]);
				}
			}
			
			//bの入力
			for(int j=0;j<m;j++){
				b[j] = Integer.parseInt(br.readLine());
			}
			//計算・出力
			int c = 0;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					c += A[i][j] * b[j];
				}
				System.out.println(c);
				c = 0;
			}
		}catch(IOException e){
			System.out.println(e);
			return;
		}
		
	}
}

