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

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[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 public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] num = br.readLine().split(" "); num br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(num[0]); n Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int m = Integer.parseInt(num[1]); m Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 Integer[][] list = new Integer[n][m]; list new Integer[n][m] n m Integer[] multipler = new Integer[m]; multipler new Integer[m] m for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		} {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		} String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				list[i][j] = Integer.parseInt(str[j]);
			} {
				list[i][j] = Integer.parseInt(str[j]);
			} list[i][j] = Integer.parseInt(str[j]) list[i][j] list[i] list i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			multipler[i] = Integer.parseInt(br.readLine());
		} {
			multipler[i] = Integer.parseInt(br.readLine());
		} multipler[i] = Integer.parseInt(br.readLine()) multipler[i] multipler i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		} {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		} int sum = 0; sum 0 for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += list[i][j] * multipler[j];
			} {
				sum += list[i][j] * multipler[j];
			} sum += list[i][j] * multipler[j] sum list[i][j] * multipler[j] list[i][j] list[i] list i j multipler[j] multipler j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	}
} public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] num = br.readLine().split(" ");
		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[1]);
		Integer[][] list = new Integer[n][m];
		Integer[] multipler = new Integer[m];

		for (int i = 0; i < n; i++) {
			String[] str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				list[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			multipler[i] = Integer.parseInt(br.readLine());
		}

		for (int i = 0; i < n; i++) {
			int sum = 0;
			for (int j = 0; j < m; j++) {
				sum += list[i][j] * multipler[j];
			}
			System.out.println(sum);
		}
	}
}