import java.util.Scanner;

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

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

