import java.util.Scanner;

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

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

