import java.util.Scanner;

        class Main{
	public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n, m, i, j;
	int a[][] = new int[100][100];
	int b[] = new int[100];
	int c[] = new int[100];
	n = scan.nextInt();
	m = scan.nextInt();
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	}
	for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	}
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	}

	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n, m, i, j;
	int a[][] = new int[100][100];
	int b[] = new int[100];
	int c[] = new int[100];
	n = scan.nextInt();
	m = scan.nextInt();
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	}
	for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	}
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	}

	}
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n, m, i, j;
	int a[][] = new int[100][100];
	int b[] = new int[100];
	int c[] = new int[100];
	n = scan.nextInt();
	m = scan.nextInt();
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	}
	for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	}
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	}

	} main {
	Scanner scan = new Scanner(System.in);

	int n, m, i, j;
	int a[][] = new int[100][100];
	int b[] = new int[100];
	int c[] = new int[100];
	n = scan.nextInt();
	m = scan.nextInt();
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	}
	for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	}
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n n m m i i j; j int a[][] = new int[100][100]; a new int[100][100] 100 100 int b[] = new int[100]; b new int[100] 100 int c[] = new int[100]; c new int[100] 100 n = scan.nextInt() n scan.nextInt() scan.nextInt scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	} i = 0; i = 0 i 0 i < n i n i++ i++ i {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	} {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	} for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		} j = 0; j = 0 j 0 j < m j m j++ j++ j {
			a[i][j] = scan.nextInt();
		} {
			a[i][j] = scan.nextInt();
		} a[i][j] = scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	} j = 0; j = 0 j 0 j < m j m j++ j++ j {
		b[j] = scan.nextInt();
	} {
		b[j] = scan.nextInt();
	} b[j] = scan.nextInt() b[j] b j scan.nextInt() scan.nextInt scan for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	} i = 0; i = 0 i 0 i < n i n i++ i++ i {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	} {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	} for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		} j = 0; j = 0 j 0 j < m j m j++ j++ j {
			c[i] += a[i][j] * b[j];
		} {
			c[i] += a[i][j] * b[j];
		} c[i] += a[i][j] * b[j] c[i] c i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args
import java.util.Scanner;

        class Main{
	public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n, m, i, j;
	int a[][] = new int[100][100];
	int b[] = new int[100];
	int c[] = new int[100];
	n = scan.nextInt();
	m = scan.nextInt();
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			a[i][j] = scan.nextInt();
		}
	}
	for(j = 0; j < m; j++) {
		b[j] = scan.nextInt();
	}
	for(i = 0; i < n; i++) {
		for(j = 0; j < m; j++) {
			c[i] += a[i][j] * b[j];
		}
		System.out.println(c[i]);
	}

	}
}