import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	}

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

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan 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 int k k c c l l i i j; j for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		} k=0; k=0 k 0 k<n k n k++ k++ k {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		} {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		} for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			} c=0; c=0 c 0 c<m c m c++ c++ c {
				a[k][c] = scan.nextInt();
			} {
				a[k][c] = scan.nextInt();
			} a[k][c] = scan.nextInt() a[k][c] a[k] a k c scan.nextInt() scan.nextInt scan for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		} l=0; l=0 l 0 l<m l m l++ l++ l {
			b[l] = scan.nextInt();
		} {
			b[l] = scan.nextInt();
		} b[l] = scan.nextInt() b[l] b l scan.nextInt() scan.nextInt scan for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		} {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		} for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			} j=0; 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 System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();

		int a[][] = new int [n][m];
		int b[] = new int[m];
		int ans[] = new int[n];
		int k,c,l,i,j;

		for(k=0;k<n;k++) {
			for(c=0;c<m;c++) {
				a[k][c] = scan.nextInt();
			}
		}

		for(l=0;l<m;l++) {
			b[l] = scan.nextInt();
		}

		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				ans[i] += a[i][j] * b[j];
			}
			System.out.println(ans[i]);
		}
		scan.close();

	}

}

