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[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_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 n = sc.nextInt();
		int m = sc.nextInt();
		int[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[i]);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[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[][] mat_A = new int[n][m]; mat_A new int[n][m] n m int[] mat_B = new int[m]; mat_B new int[m] m int[] mat_C = new int[n]; mat_C new int[n] n for(int i = 0; i<n; i++){
			for(int j = 0;j<m;j++){
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			}
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			for(int j = 0;j<m;j++){
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			}
		} {
			for(int j = 0;j<m;j++){
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			}
		} for(int j = 0;j<m;j++){
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			} {
				int mat_element = sc.nextInt();
				mat_A[i][j] = mat_element;
			} int mat_element = sc.nextInt(); mat_element sc.nextInt() sc.nextInt sc mat_A[i][j] = mat_element mat_A[i][j] mat_A[i] mat_A i j mat_element for(int i=0;i<m;i++){
			int mat_element2 = sc.nextInt();
			mat_B[i] = mat_element2;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int mat_element2 = sc.nextInt();
			mat_B[i] = mat_element2;
		} {
			int mat_element2 = sc.nextInt();
			mat_B[i] = mat_element2;
		} int mat_element2 = sc.nextInt(); mat_element2 sc.nextInt() sc.nextInt sc mat_B[i] = mat_element2 mat_B[i] mat_B i mat_element2 for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		} {
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		} for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				mat_C[i] += mat_A[i][j] * mat_B[j];
			} {
				mat_C[i] += mat_A[i][j] * mat_B[j];
			} mat_C[i] += mat_A[i][j] * mat_B[j] mat_C[i] mat_C i mat_A[i][j] * mat_B[j] mat_A[i][j] mat_A[i] mat_A i j mat_B[j] mat_B j for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[i]);
		} int i = 0; int i = 0; i 0 i<mat_C.length i mat_C.length mat_C mat_C.length i++ i++ i {
			System.out.println(mat_C[i]);
		} {
			System.out.println(mat_C[i]);
		} System.out.println(mat_C[i]) System.out.println System.out System System.out mat_C[i] mat_C 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[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[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[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[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[][] mat_A = new int[n][m];
		int[] mat_B = new int[m];
		int[] mat_C = new int[n];

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

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

		for(int i = 0;i<n; i++){
			for(int j = 0; j<m; j++){
				mat_C[i] += mat_A[i][j] * mat_B[j];
			}
		}

		for(int i = 0; i<mat_C.length; i++){
			System.out.println(mat_C[i]);
		}
	}
}

