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

public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String buffer; buffer int count = 0; count 0 int n = 0; n 0 int m = 0; m 0 int[][] matrix = null; matrix null int[] vector = null; vector null try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} catch (Exception ex) {
			ex.printStackTrace();
		} Exception ex {
			ex.printStackTrace();
		} ex.printStackTrace() ex.printStackTrace ex {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			} (buffer = reader.readLine())  != null (buffer = reader.readLine()) buffer reader.readLine() reader.readLine reader null {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			} String[] strings = buffer.split(" "); strings buffer.split(" ") buffer.split buffer " " ++count count if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				} count == 1 count 1 {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				} n = Integer.valueOf(strings[0]) n Integer.valueOf(strings[0]) Integer.valueOf Integer strings[0] strings 0 m = Integer.valueOf(strings[1]) m Integer.valueOf(strings[1]) Integer.valueOf Integer strings[1] strings 1 matrix = new int[n][m] matrix new int[n][m] n m vector = new int[m] vector new int[m] m {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				} if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					} 1 < count && count <= 1 + n 1 < count 1 count count <= 1 + n count 1 + n 1 n {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					} for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						} int w = 0; int w = 0; w 0 w < m w m w++ w++ w {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						} {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						} matrix[count - 2][w] = Integer.valueOf(strings[w]) matrix[count - 2][w] matrix[count - 2] matrix count - 2 count 2 w Integer.valueOf(strings[w]) Integer.valueOf Integer strings[w] strings w if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					} 1 + n < count && count <= 1 + n + m 1 + n < count 1 + n 1 n count count <= 1 + n + m count 1 + n + m 1 + n + m 1 n m {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					} vector[count - 2 - n] = Integer.valueOf(strings[0]) vector[count - 2 - n] vector count - 2 - n count - 2 - n count 2 n Integer.valueOf(strings[0]) Integer.valueOf Integer strings[0] strings 0 if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					} 1 + n + m == count 1 + n + m 1 + n + m 1 n m count {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					} for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						} int h = 0; int h = 0; h 0 h < n h n h++ h++ h {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						} {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						} int calc = 0; calc 0 for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							} int w = 0; int w = 0; w 0 w < m w m w++ w++ w {
								calc += (matrix[h][w] * vector[w]);
							} {
								calc += (matrix[h][w] * vector[w]);
							} calc += (matrix[h][w] * vector[w]) calc (matrix[h][w] * vector[w]) matrix[h][w] matrix[h] matrix h w vector[w] vector w System.out.println(calc) System.out.println System.out System System.out calc String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int count = 0;

		int n = 0;
		int m = 0;
		int[][] matrix = null;
		int[] vector = null;

		try {
			while ((buffer = reader.readLine())  != null) {
				String[] strings = buffer.split(" ");
				++count;
				if (count == 1) {
					n = Integer.valueOf(strings[0]);
					m = Integer.valueOf(strings[1]);
					matrix = new int[n][m];
					vector = new int[m];
				}
				else {
					if (1 < count && count <= 1 + n) {
						for (int w = 0; w < m; w++) {
							matrix[count - 2][w] = Integer.valueOf(strings[w]);
						}
					}
					if (1 + n < count && count <= 1 + n + m) {
						vector[count - 2 - n] = Integer.valueOf(strings[0]);
					}
					if (1 + n + m == count) {
						for (int h = 0; h < n; h++) {
							int calc = 0;
							for (int w = 0; w < m; w++) {
								calc += (matrix[h][w] * vector[w]);
							}
							System.out.println(calc);
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}

