import java.io.IOException;
import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	} main {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] a = new int[n][m]; a new int[n][m] n m int[][] b = new int[m][1]; b new int[m][1] m 1 int[][] output = new int[n][1]; output new int[n][1] n 1 for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a[i][j] = sc.nextInt();
			} {
				a[i][j] = sc.nextInt();
			} a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i< m i m i++ i++ i {
			b[i][0] = sc.nextInt();
		} {
			b[i][0] = sc.nextInt();
		} b[i][0] = sc.nextInt() b[i][0] b[i] b i 0 sc.nextInt() sc.nextInt sc for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		} int i = 0; int i = 0; i 0 i< n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		} {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		} for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				output[i][0] += a[i][j] * b[j][0];
			} {
				output[i][0] += a[i][j] * b[j][0];
			} output[i][0] += a[i][j] * b[j][0] output[i][0] output[i] output i 0 a[i][j] * b[j][0] a[i][j] a[i] a i j b[j][0] b[j] b j 0 for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			System.out.println(output[i][0]);
		} {
			System.out.println(output[i][0]);
		} System.out.println(output[i][0]) System.out.println System.out System System.out output[i][0] output[i] output i 0 String[] args args public class Main {

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	}
} public class Main {

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] a = new int[n][m];
		int[][] b = new int[m][1];
		int[][] output = new int[n][1];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i< m; i++) {
			b[i][0] = sc.nextInt();
		}

		for (int i = 0; i< n; i++) {
			for (int j = 0; j < m; j++) {
				output[i][0] += a[i][j] * b[j][0];
			}
		}

		for (int i = 0; i<n; i++) {
			System.out.println(output[i][0]);
		}
	}
}