import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	}
} Main public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	} main {
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	} int n n m; m int[] b b c; c int[][] A; A String[] str; str BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " n = Integer.parseInt(str[0]) n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 m = Integer.parseInt(str[1]) m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 A = new int[n][m] A new int[n][m] n m b = new int[m] b new int[m] m c = new int[n] c new int[n] n for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		} {
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		} str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				A[i][j] = Integer.parseInt(str[j]);
			} {
				A[i][j] = Integer.parseInt(str[j]);
			} A[i][j] = Integer.parseInt(str[j]) A[i][j] A[i] A i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		} {
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		} int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				c[j] += A[j][i] * num;
			} {
				c[j] += A[j][i] * num;
			} c[j] += A[j][i] * num c[j] c j A[j][i] * num A[j][i] A[j] A j i num for(int i=0;i<n;i++){
			System.out.println(c[i]);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i br.close() br.close br String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException{
		int n,m;
		int[] b,c;
		int[][] A;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		str = br.readLine().split(" ");
		n = Integer.parseInt(str[0]);
		m = Integer.parseInt(str[1]);
		A = new int[n][m];
		b = new int[m];
		c = new int[n];
		for(int i=0;i<n;i++){
			str = br.readLine().split(" ");
			for(int j=0;j<m;j++){
				A[i][j] = Integer.parseInt(str[j]);
			}
		}
		for(int i=0;i<m;i++){
			int num = Integer.parseInt(br.readLine());
			for(int j=0;j<n;j++){
				c[j] += A[j][i] * num;
			}
		}
		for(int i=0;i<n;i++){
			System.out.println(c[i]);
		}
		br.close();
	}
}