import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	} 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 i i j; j int[] sum = new int[n]; sum new int[n] n int[] product = new int[m]; product new int[m] m int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		} i = 0; i = 0 i 0 i < A.length i A.length A A.length i++ i++ i {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		} {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		} for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			} j = 0; j = 0 j 0 j < A[i].length j A[i].length A[i] A i A[i].length 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 (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		} j = 0; j = 0 j 0 j < b.length j b.length b b.length j++ j++ j {
			b[j] = sc.nextInt();
		} {
			b[j] = sc.nextInt();
		} b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		} i = 0; i = 0 i 0 i < A.length i A.length A A.length i++ i++ i {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		} {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		} for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			} j = 0; j = 0 j 0 j < A[i].length j A[i].length A[i] A i A[i].length j++ j++ j {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			} {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			} product[j] = A[i][j] * b[j] product[j] product j A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j sum[i] += product[j] sum[i] sum i product[j] product j c[i] = sum[i] c[i] c i sum[i] sum i for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		} i = 0; i = 0 i 0 i < c.length i c.length c c.length i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i sc.close() sc.close sc String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int i, j;
		int[] sum = new int[n];
		int[] product = new int[m];
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for (j = 0; j < b.length; j++) {
			b[j] = sc.nextInt();
		}
		for (i = 0; i < A.length; i++) {
			for (j = 0; j < A[i].length; j++) {
				product[j] = A[i][j] * b[j];
				sum[i] += product[j];
			}
			c[i] = sum[i];
		}
		for (i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}
}
