import java.util.Scanner;

public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	}
}

 import java.util.Scanner; Scanner java.util public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	}
} Main public static final int BIG_NUM  = 2000000000; BIG_NUM 2000000000 public static final int MOD  = 1000000007; MOD 1000000007 public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	} 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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	} 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]; B new int[M] M for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		} int row = 0; int row = 0; row 0 row < N row N row++ row++ row {
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		} {
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		} for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			} int col = 0; int col = 0; col 0 col < M col M col++ col++ col {
				A[row][col] = sc.nextInt();
			} {
				A[row][col] = sc.nextInt();
			} A[row][col] = sc.nextInt() A[row][col] A[row] A row col sc.nextInt() sc.nextInt sc for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		} int row = 0; int row = 0; row 0 row < M row M row++ row++ row {
			B[row] = sc.nextInt();
		} {
			B[row] = sc.nextInt();
		} B[row] = sc.nextInt() B[row] B row sc.nextInt() sc.nextInt sc int ans; ans for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		} int row = 0; int row = 0; row 0 row < N row N row++ row++ row {
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		} {
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		} ans = 0 ans 0 for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			} int col = 0; int col = 0; col 0 col < M col M col++ col++ col {
				ans += A[row][col]*B[col];
			} {
				ans += A[row][col]*B[col];
			} ans += A[row][col]*B[col] ans A[row][col]*B[col] A[row][col] A[row] A row col B[col] B col System.out.printf("%d\n", ans) System.out.printf System.out System System.out "%d\n" ans String[] args args public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	}
} public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		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];

		for(int row = 0; row < N; row++){
			for(int col = 0; col < M; col++){
				A[row][col] = sc.nextInt();
			}
		}

		for(int row = 0; row < M; row++){
			B[row] = sc.nextInt();
		}

		int ans;

		for(int row = 0; row < N; row++){
			ans = 0;
			for(int col = 0; col < M; col++){
				ans += A[row][col]*B[col];
			}
			System.out.printf("%d\n", ans);
		}
	}
}


