import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	} main {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

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

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	}
} Main
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

			int i;
			int j;

			int n = sc.nextInt();
			int m = sc.nextInt();

			int A[][] = new int[n][m];
			int b[] = new int[m];
			int c[] = new int[n];

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

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

			for(i = 0; i < n; i++) {
				for(j = 0; j < m; j++) {
					c[i] = c[i] + A[i][j] * b[j];
				}
				System.out.println(c[i]);
			}

	}
}