import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	}

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

	public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	}

} Main public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	} main {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	} 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[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		} int ni = 0; int ni = 0; ni 0 ni < n ni n ni++ ni++ ni {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		} {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		} for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			} int mi = 0; int mi = 0; mi 0 mi < m mi m mi++ mi++ mi {
				A[ni][mi] = sc.nextInt();
			} {
				A[ni][mi] = sc.nextInt();
			} A[ni][mi] = sc.nextInt() A[ni][mi] A[ni] A ni mi sc.nextInt() sc.nextInt sc for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		} int mi = 0; int mi = 0; mi 0 mi < m mi m mi++ mi++ mi {
			b[mi] = sc.nextInt();
		} {
			b[mi] = sc.nextInt();
		} b[mi] = sc.nextInt() b[mi] b mi sc.nextInt() sc.nextInt sc for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		} int mi = 0; int mi = 0; mi 0 mi < m mi m mi++ mi++ mi {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		} {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		} for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			} int ni = 0; int ni = 0; ni 0 ni < n ni n ni++ ni++ ni {
				c[ni] += A[ni][mi] * b[mi];
			} {
				c[ni] += A[ni][mi] * b[mi];
			} c[ni] += A[ni][mi] * b[mi] c[ni] c ni A[ni][mi] * b[mi] A[ni][mi] A[ni] A ni mi b[mi] b mi for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		} int ni = 0; int ni = 0; ni 0 ni < n ni n ni++ ni++ ni {
			System.out.println(c[ni]);
		} {
			System.out.println(c[ni]);
		} System.out.println(c[ni]) System.out.println System.out System System.out c[ni] c ni String[] args args public class Main {

	public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	}

} public class Main {

	public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	}

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

	public static void main(String[] args) {
		//??\?????????
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] A = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for (int ni = 0; ni < n; ni++) {
			for (int mi = 0; mi < m; mi++) {
				A[ni][mi] = sc.nextInt();
			}
		}
		for(int mi = 0; mi < m; mi++) {
			b[mi] = sc.nextInt();
		}
		//?¨????
		for (int mi = 0; mi < m; mi++) {
			for (int ni = 0; ni < n; ni++) {
				c[ni] += A[ni][mi] * b[mi];
			}
		}
		//??????
		for (int ni = 0; ni < n; ni++){
			System.out.println(c[ni]);
		}
	}

}