import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {
	public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
} Main public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	} main {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	} try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} StringBuilder answer = new StringBuilder(); answer new StringBuilder() String lb = System.getProperty("line.separator"); lb System.getProperty("line.separator") System.getProperty System "line.separator" long sum = 0; sum 0 BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String[] nm = input.readLine().split(" "); nm input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " 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 ArrayList<String[]> matrix = new ArrayList<String[]>(n); matrix new ArrayList<String[]>(n) for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				matrix.add(input.readLine().split(" "));
			} {
				matrix.add(input.readLine().split(" "));
			} matrix.add(input.readLine().split(" ")) matrix.add matrix input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " String[] vector = new String[m]; vector new String[m] m for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				vector[i] = input.readLine();
			} {
				vector[i] = input.readLine();
			} vector[i] = input.readLine() vector[i] vector i input.readLine() input.readLine input for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			} {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			} String[] column = matrix.remove(0); column matrix.remove(0) matrix.remove matrix 0 sum = 0 sum 0 for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				} {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				} sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]) sum Integer.parseInt(column[j]) * Integer.parseInt(vector[j]) Integer.parseInt(column[j]) Integer.parseInt Integer column[j] column j Integer.parseInt(vector[j]) Integer.parseInt Integer vector[j] vector j answer.append(String.valueOf(sum)).append(lb) answer.append(String.valueOf(sum)).append answer.append(String.valueOf(sum)) answer.append answer String.valueOf(sum) String.valueOf String sum lb System.out.print(answer.toString()) System.out.print System.out System System.out answer.toString() answer.toString answer String[] args args public class Main {
	public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
} public class Main {
	public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		try {
			StringBuilder answer = new StringBuilder();
			String lb = System.getProperty("line.separator");
			long sum = 0;
			BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
			String[] nm = input.readLine().split(" ");
			int n = Integer.parseInt(nm[0]);
			int m = Integer.parseInt(nm[1]);
			ArrayList<String[]> matrix = new ArrayList<String[]>(n);
			for (int i = 0; i < n; i++) {
				matrix.add(input.readLine().split(" "));
			}
			String[] vector = new String[m];
			for (int i = 0; i < m; i++) {
				vector[i] = input.readLine();
			}
			for (int i = 0; i < n; i++) {
				String[] column = matrix.remove(0);
				sum = 0;
				for (int j = 0; j < m; j++) {
					sum += Integer.parseInt(column[j]) * Integer.parseInt(vector[j]);
				}
				answer.append(String.valueOf(sum)).append(lb);
			}
			System.out.print(answer.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
}