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

/**
 * 
 */

/**
 * @author cthanh
 *
 */
public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	}

} Main /**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	} main {
		// TODO ?????????????????????????????????????????????

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) 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[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vector   = new int[m]; vector new int[m] m for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

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

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

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

				matrix[i][j] = Integer.parseInt(str[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {

				matrix[i][j] = Integer.parseInt(str[j]);
			} {

				matrix[i][j] = Integer.parseInt(str[j]);
			} matrix[i][j] = Integer.parseInt(str[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		} {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		} String str1 = br.readLine(); str1 br.readLine() br.readLine br vector[k] = Integer.parseInt(str1) vector[k] vector k Integer.parseInt(str1) Integer.parseInt Integer str1 for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		} {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		} int kakezan= 0; kakezan 0 for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				
				kakezan += matrix[i][j] * vector[j];

			} {
				
				kakezan += matrix[i][j] * vector[j];

			} kakezan += matrix[i][j] * vector[j] kakezan matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j System.out.println(kakezan) System.out.println System.out System System.out kakezan String[] args args public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	}

} public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	}

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

/**
 * 
 */

/**
 * @author cthanh
 *
 */
public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */

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

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


		for (int i = 0; i < n; i++) {
			str = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {

				matrix[i][j] = Integer.parseInt(str[j]);
			}
		}
		for (int k = 0; k < m; k++) {
			String str1 = br.readLine();
			vector[k] = Integer.parseInt(str1);
		}

		for (int i = 0; i < n; i++) {
			int kakezan= 0;
			for (int j = 0; j < m; j++) {
				
				kakezan += matrix[i][j] * vector[j];

			}
			System.out.println(kakezan);
		}

	}

}