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));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	}
} 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));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 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++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		} {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		} String[] aStr = br.readLine().split(" "); aStr br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a[i][j] = Integer.parseInt(aStr[j]);
			} {
				a[i][j] = Integer.parseInt(aStr[j]);
			} a[i][j] = Integer.parseInt(aStr[j]) a[i][j] a[i] a i j Integer.parseInt(aStr[j]) Integer.parseInt Integer aStr[j] aStr j for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = Integer.parseInt(br.readLine());
		} {
			b[i] = Integer.parseInt(br.readLine());
		} b[i] = Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int sum = 0; sum 0 for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		} {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		} for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int c = a[i][j] * b[j];
				sum += c;
			} {
				int c = a[i][j] * b[j];
				sum += c;
			} int c = a[i][j] * b[j]; c a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j sum += c sum c sb.append(sum).append("\n") sb.append(sum).append sb.append(sum) sb.append sb sum "\n" sum = 0 sum 0 System.out.print(sb) System.out.print System.out System System.out sb 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[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	}
} 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));
		StringBuilder sb = new StringBuilder();

		String[] str = br.readLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for (int i = 0; i < n; i++) {
			String[] aStr = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				a[i][j] = Integer.parseInt(aStr[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			b[i] = Integer.parseInt(br.readLine());
		}
		int sum = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int c = a[i][j] * b[j];
				sum += c;
			}
			sb.append(sum).append("\n");
			sum = 0;
		}

		System.out.print(sb);
	}
}