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[][] a = new int[m][n];
		int[] b = new int [m];
		int [] calc = new int[n];
		for(int i = 0;i < n;i++ ) {
			for(int j = 0;j < m;j++) {
				int c = sc.nextInt();
				a[j][i] = c;
			}
		}
		for(int i = 0;i < m;i++) {
			int c = sc.nextInt();
			b[i] = c;
		}
		for(int i = 0;i < n;i++) {
			for(int j = 0;j < m;j++) {
				calc[i] = calc[i] + (a[j][i] * b[j]);
			}
			System.out.println(calc[i]);
		}
	}
}


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



