import java.util.Scanner;
public class Main {
	void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	}
	public static void main(String args[]){
		Main m = new Main();
		m.execute();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	}
	public static void main(String args[]){
		Main m = new Main();
		m.execute();
	}
} Main void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	} execute {
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	} 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 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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		} {
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		} int ans = 0; ans 0 for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				ans+=a[i][j]*b[j];
			} {
				ans+=a[i][j]*b[j];
			} ans+=a[i][j]*b[j] ans a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.println(ans) System.out.println System.out System System.out ans public static void main(String args[]){
		Main m = new Main();
		m.execute();
	} main {
		Main m = new Main();
		m.execute();
	} Main m = new Main(); m new Main() m.execute() m.execute m String args[] args public class Main {
	void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	}
	public static void main(String args[]){
		Main m = new Main();
		m.execute();
	}
} public class Main {
	void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	}
	public static void main(String args[]){
		Main m = new Main();
		m.execute();
	}
} Main
import java.util.Scanner;
public class Main {
	void execute(){
		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];
		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++){
			int ans = 0;
			for(int j = 0;j < m;j++){
				ans+=a[i][j]*b[j];
			}
			System.out.println(ans);
		}
	}
	public static void main(String args[]){
		Main m = new Main();
		m.execute();
	}
}