import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	} main {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	} 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 for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		} {
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		} for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			} int i2=0; int i2=0; i2 0 i2<m i2 m i2++ i2++ i2 {
				int x = scan.nextInt();
				A[i][i2] = x;
			} {
				int x = scan.nextInt();
				A[i][i2] = x;
			} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan A[i][i2] = x A[i][i2] A[i] A i i2 x for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int x = scan.nextInt();
			b[i] = x;
		} {
			int x = scan.nextInt();
			b[i] = x;
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan b[i] = x b[i] b i x for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		} {
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		} int Ci = 0; Ci 0 int y = 0; y 0 for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			} int i2=0; int i2=0; i2 0 i2<m i2 m i2++ i2++ i2 {
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			} {
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			} y = A[i][i2]*b[i2] y A[i][i2]*b[i2] A[i][i2] A[i] A i i2 b[i2] b i2 Ci = Ci + y Ci Ci + y Ci y System.out.println(Ci) System.out.println System.out System System.out Ci String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		// ??\???
		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];
		// ?????????????´?
		for(int i=0; i<n; i++){
			for(int i2=0; i2<m; i2++){
				int x = scan.nextInt();
				A[i][i2] = x;
			}
		}
		for(int i=0; i<m; i++){
			int x = scan.nextInt();
			b[i] = x;
		}
		
		
		// 	A ??¨ b ??????????±???????
		for(int i=0; i<n; i++){
			int Ci = 0;
			int y = 0;
			for(int i2=0; i2<m; i2++){
				y = A[i][i2]*b[i2];
				Ci = Ci + y;
			}
			// ??????
			System.out.println(Ci);
		}
	
		
	}

}