import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	}

	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	}

	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} Main void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	} run {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	} 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 abeck[][] = new int[n][m]; abeck new int[n][m] n m int bbeck[] = new int[m]; bbeck new int[m] m int ancebeck[] = new int[n]; ancebeck new int[n] n for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[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++){
				abeck[i][j] = s.nextInt();
			}
		} {
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		} for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				abeck[i][j] = s.nextInt();
			} {
				abeck[i][j] = s.nextInt();
			} abeck[i][j] = s.nextInt() abeck[i][j] abeck[i] abeck i j s.nextInt() s.nextInt s for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			bbeck[i] = s.nextInt();
		} {
			bbeck[i] = s.nextInt();
		} bbeck[i] = s.nextInt() bbeck[i] bbeck i s.nextInt() s.nextInt s for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		} {
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		} for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				ancebeck[i] += abeck[i][j] * bbeck[j];
			} {
				ancebeck[i] += abeck[i][j] * bbeck[j];
			} ancebeck[i] += abeck[i][j] * bbeck[j] ancebeck[i] ancebeck i abeck[i][j] * bbeck[j] abeck[i][j] abeck[i] abeck i j bbeck[j] bbeck j System.out.println(ancebeck[i]) System.out.println System.out System System.out ancebeck[i] ancebeck i public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	} main {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	}

	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	}

	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} Main
import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int abeck[][] = new int[n][m];
		int bbeck[] = new int[m];
		int ancebeck[] = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				abeck[i][j] = s.nextInt();
			}
		}
		for(int i = 0; i < m ; i++){
			bbeck[i] = s.nextInt();
		}
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				ancebeck[i] += abeck[i][j] * bbeck[j];
			}
			System.out.println(ancebeck[i]);
		}
		
	}

	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
}