import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String[] elm = br.readLine().split(" "); elm br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(elm[0]); n Integer.parseInt(elm[0]) Integer.parseInt Integer elm[0] elm 0 int m = Integer.parseInt(elm[1]); m Integer.parseInt(elm[1]) Integer.parseInt Integer elm[1] elm 1 int[][] mat = new int[n][m]; mat new int[n][m] n m int[] vct = new int[m]; vct new int[m] m int[] ans = new int[n]; ans new int[n] n for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		} {
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		} String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				mat[i][j] = Integer.parseInt(line[j]);
			} {
				mat[i][j] = Integer.parseInt(line[j]);
			} mat[i][j] = Integer.parseInt(line[j]) mat[i][j] mat[i] mat i j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vct[i] = Integer.parseInt(br.readLine());
		} {
			vct[i] = Integer.parseInt(br.readLine());
		} vct[i] = Integer.parseInt(br.readLine()) vct[i] vct i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		} {
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		} for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				ans[i] += mat[i][j] * vct[j];
			} {
				ans[i] += mat[i][j] * vct[j];
			} ans[i] += mat[i][j] * vct[j] ans[i] ans i mat[i][j] * vct[j] mat[i][j] mat[i] mat i j vct[j] vct j System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String[] elm = br.readLine().split(" ");
		int n = Integer.parseInt(elm[0]);
		int m = Integer.parseInt(elm[1]);
		int[][] mat = new int[n][m];
		int[] vct = new int[m]; 
		int[] ans = new int[n];
		for(int i = 0; i < n ; i++){
			String[] line = br.readLine().split(" ");
			for(int j = 0; j < m ; j++){
				mat[i][j] = Integer.parseInt(line[j]);
			}
		}
		for(int i = 0; i < m ; i++){
			vct[i] = Integer.parseInt(br.readLine());
		}
		for(int i = 0; i < n ; i++){
			for(int j = 0; j < m ; j++){
				ans[i] += mat[i][j] * vct[j];
			}
		System.out.println(ans[i]);
		}
	}
}