import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	}

} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	} main {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int height=sc.nextInt(); height sc.nextInt() sc.nextInt sc int wide=sc.nextInt(); wide sc.nextInt() sc.nextInt sc int[][] matrix=new int[height][wide]; matrix new int[height][wide] height wide int[] vector=new int[wide]; vector new int[wide] wide for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		} int i=0; int i=0; i 0 i<height i height i++ i++ i {
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		} {
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		} for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			} int j=0; int j=0; j 0 j<wide j wide j++ j++ j {
				matrix[i][j]=sc.nextInt();
			} {
				matrix[i][j]=sc.nextInt();
			} matrix[i][j]=sc.nextInt() matrix[i][j] matrix[i] matrix i j sc.nextInt() sc.nextInt sc for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<wide i wide i++ i++ i {
			vector[i]=sc.nextInt();
		} {
			vector[i]=sc.nextInt();
		} vector[i]=sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc int[] ans_ary=new int[height]; ans_ary new int[height] height for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		} int i=0; int i=0; i 0 i<height i height i++ i++ i {
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		} {
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		} for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			} int j=0; int j=0; j 0 j<wide j wide j++ j++ j {
				ans_ary[i]+=matrix[i][j]*vector[j];
			} {
				ans_ary[i]+=matrix[i][j]*vector[j];
			} ans_ary[i]+=matrix[i][j]*vector[j] ans_ary[i] ans_ary i matrix[i][j]*vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		} int i=0; int i=0; i 0 i<height i height i++ i++ i {
			System.out.println(ans_ary[i]);
		} {
			System.out.println(ans_ary[i]);
		} System.out.println(ans_ary[i]) System.out.println System.out System System.out ans_ary[i] ans_ary i String[] args args public class Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	}

} public class Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int height=sc.nextInt();
		int wide=sc.nextInt();
		int[][] matrix=new int[height][wide];
		int[] vector=new int[wide];

		//入力
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				matrix[i][j]=sc.nextInt();
			}
		}
		for(int i=0;i<wide;i++){
			vector[i]=sc.nextInt();
		}

		//計算
		int[] ans_ary=new int[height];
		for(int i=0;i<height;i++){
			for(int j=0;j<wide;j++){
				ans_ary[i]+=matrix[i][j]*vector[j];
			}
		}

		//出力
		for(int i=0;i<height;i++){
			System.out.println(ans_ary[i]);
		}
	}

}

