import java.io.IOException;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	}
} Main public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	} main {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int []a = new int [100*n+m]; a new int [100*n+m] 100*n+m 100*n 100 n m for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			} int b=0; int b=0; b 0 b<n b n b++ b++ b {
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			} {
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			} for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				} int c=0; int c=0; c 0 c<m c m c++ c++ c {
					a[100*b+c] = sc.nextInt();
				} {
					a[100*b+c] = sc.nextInt();
				} a[100*b+c] = sc.nextInt() a[100*b+c] a 100*b+c 100*b 100 b c sc.nextInt() sc.nextInt sc int []b = new int[m]; b new int[m] m for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			} int c=0; int c=0; c 0 c<m c m c++ c++ c {
				b[c] = sc.nextInt();
			} {
				b[c] = sc.nextInt();
			} b[c] = sc.nextInt() b[c] b c sc.nextInt() sc.nextInt sc for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			} int d=0; int d=0; d 0 d<n d n d++ d++ d {
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			} {
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			} int x=0; x 0 for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				} int c=0; int c=0; c 0 c<m c m c++ c++ c {
					x=x+a[100*d+c]*b[c];
				} {
					x=x+a[100*d+c]*b[c];
				} x=x+a[100*d+c]*b[c] x x+a[100*d+c]*b[c] x a[100*d+c]*b[c] a[100*d+c] a 100*d+c 100*d 100 d c b[c] b c System.out.println(x) System.out.println System.out System System.out x String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	}
} Main
import java.io.IOException;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int m = sc.nextInt();
			int []a = new int [100*n+m];
			
			for(int b=0;b<n;b++){
				for(int c=0;c<m;c++){
					a[100*b+c] = sc.nextInt();
				}
			}
			
			int []b = new int[m];
			for(int c=0;c<m;c++){
				b[c] = sc.nextInt();
			}
			
			
			for(int d=0;d<n;d++){
				int x=0;
				for(int c=0;c<m;c++){
					x=x+a[100*d+c]*b[c];
				}
				System.out.println(x);
			}
	}
}