import java.io.*;
import java.util.*;

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String[] buf = (br.readLine()).split(" ");
		int n = Integer.parseInt(buf[0]);
		int m = Integer.parseInt(buf[1]);
		
		ArrayList<Integer> matrix = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		}
		
		
		ArrayList<Integer> vector = new ArrayList<Integer>();
		for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		}
		
		ArrayList<Integer> answer = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		}
		
		for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String[] buf = (br.readLine()).split(" ");
		int n = Integer.parseInt(buf[0]);
		int m = Integer.parseInt(buf[1]);
		
		ArrayList<Integer> matrix = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		}
		
		
		ArrayList<Integer> vector = new ArrayList<Integer>();
		for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		}
		
		ArrayList<Integer> answer = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		}
		
		for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		}
	}
} Main public static void main(String[] args) throws IOException {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String[] buf = (br.readLine()).split(" ");
		int n = Integer.parseInt(buf[0]);
		int m = Integer.parseInt(buf[1]);
		
		ArrayList<Integer> matrix = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		}
		
		
		ArrayList<Integer> vector = new ArrayList<Integer>();
		for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		}
		
		ArrayList<Integer> answer = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		}
		
		for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		}
	} main {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String[] buf = (br.readLine()).split(" ");
		int n = Integer.parseInt(buf[0]);
		int m = Integer.parseInt(buf[1]);
		
		ArrayList<Integer> matrix = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		}
		
		
		ArrayList<Integer> vector = new ArrayList<Integer>();
		for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		}
		
		ArrayList<Integer> answer = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		}
		
		for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		}
	} InputStreamReader in = new InputStreamReader(System.in); in new InputStreamReader(System.in) BufferedReader br = new BufferedReader(in); br new BufferedReader(in) String[] buf = (br.readLine()).split(" "); buf (br.readLine()).split(" ") (br.readLine()).split (br.readLine()) br.readLine br " " int n = Integer.parseInt(buf[0]); n Integer.parseInt(buf[0]) Integer.parseInt Integer buf[0] buf 0 int m = Integer.parseInt(buf[1]); m Integer.parseInt(buf[1]) Integer.parseInt Integer buf[1] buf 1 ArrayList<Integer> matrix = new ArrayList<Integer>(); matrix new ArrayList<Integer>() for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		} {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		} buf = (br.readLine()).split(" ") buf (br.readLine()).split(" ") (br.readLine()).split (br.readLine()) br.readLine br " " for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrix.add(Integer.parseInt(buf[j]));
			} {
				matrix.add(Integer.parseInt(buf[j]));
			} matrix.add(Integer.parseInt(buf[j])) matrix.add matrix Integer.parseInt(buf[j]) Integer.parseInt Integer buf[j] buf j ArrayList<Integer> vector = new ArrayList<Integer>(); vector new ArrayList<Integer>() for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		} {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		} int num_element = Integer.parseInt(br.readLine()); num_element Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br vector.add(num_element) vector.add vector num_element ArrayList<Integer> answer = new ArrayList<Integer>(); answer new ArrayList<Integer>() for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		} {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		} int temp = 0; temp 0 for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				temp += matrix.get(i*m+j) * vector.get(j);
			} {
				temp += matrix.get(i*m+j) * vector.get(j);
			} temp += matrix.get(i*m+j) * vector.get(j) temp matrix.get(i*m+j) * vector.get(j) matrix.get(i*m+j) matrix.get matrix i*m+j i*m i m j vector.get(j) vector.get vector j answer.add(temp) answer.add answer temp for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(answer.get(i));
		} {
			System.out.println(answer.get(i));
		} System.out.println(answer.get(i)) System.out.println System.out System System.out answer.get(i) answer.get answer i String[] args args
import java.io.*;
import java.util.*;

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String[] buf = (br.readLine()).split(" ");
		int n = Integer.parseInt(buf[0]);
		int m = Integer.parseInt(buf[1]);
		
		ArrayList<Integer> matrix = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			buf = (br.readLine()).split(" ");
			
			for (int j = 0; j < m; j++) {
				matrix.add(Integer.parseInt(buf[j]));
			}
		}
		
		
		ArrayList<Integer> vector = new ArrayList<Integer>();
		for (int i = 0; i < m; i++) {
			int num_element = Integer.parseInt(br.readLine());
			vector.add(num_element);
		}
		
		ArrayList<Integer> answer = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			int temp = 0;
			for (int j = 0; j < m; j++) {
				temp += matrix.get(i*m+j) * vector.get(j);
			}
			answer.add(temp);
		}
		
		for (int i = 0; i < n; i++) {
			System.out.println(answer.get(i));
		}
	}
}