import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	}		
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	}		
} Main public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	} main {
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	} Scanner S = new Scanner(System.in); S new Scanner(System.in) int n = S.nextInt(); n S.nextInt() S.nextInt S int m = S.nextInt(); m S.nextInt() S.nextInt S int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] ans = new int[n]; ans new int[n] n for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		} {
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		} for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				A[i][j] = S.nextInt();
			} {
				A[i][j] = S.nextInt();
			} A[i][j] = S.nextInt() A[i][j] A[i] A i j S.nextInt() S.nextInt S for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = S.nextInt();
		} {
			b[i] = S.nextInt();
		} b[i] = S.nextInt() b[i] b i S.nextInt() S.nextInt S for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		} {
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		} for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				ans[i] += A[i][j] * b[j];
			} {
				ans[i] += A[i][j] * b[j];
			} ans[i] += A[i][j] * b[j] ans[i] ans i A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(ans[i]);
		} {
			System.out.println(ans[i]);
		} System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main{
	public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	}		
} public class Main{
	public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int n = S.nextInt();
		int m = S.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] ans = new int[n];
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				A[i][j] = S.nextInt();
			}
		}
		
		for(int i = 0;i < m;i++){
			b[i] = S.nextInt();
		}
		
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				ans[i] += A[i][j] * b[j];
			}
		}
		
		for(int i = 0;i < n;i++){
			System.out.println(ans[i]);
		}
	}		
} Main
import java.util.Scanner;

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