import java.io.*;

public class Main{
public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
}
} import java.io.*; io.* java public class Main{
public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
}
} Main public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
} main {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int[][] MatA = new int[n][m]; MatA new int[n][m] n m int[] MatB = new int[m]; MatB new int[m] m int ans; ans for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	} {
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	} String[] strx = br.readLine().split(" "); strx br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
			MatA[i][j] = Integer.parseInt(strx[j]);
		} {
			MatA[i][j] = Integer.parseInt(strx[j]);
		} MatA[i][j] = Integer.parseInt(strx[j]) MatA[i][j] MatA[i] MatA i j Integer.parseInt(strx[j]) Integer.parseInt Integer strx[j] strx j for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
		MatB[k] = Integer.parseInt(br.readLine());
	} {
		MatB[k] = Integer.parseInt(br.readLine());
	} MatB[k] = Integer.parseInt(br.readLine()) MatB[k] MatB k Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	} int x = 0; int x = 0; x 0 x < n x n x ++ x ++ x {
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	} {
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	} ans = 0 ans 0 for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		} int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
			ans += MatA[x][y] * MatB[y];
		} {
			ans += MatA[x][y] * MatB[y];
		} ans += MatA[x][y] * MatB[y] ans MatA[x][y] * MatB[y] MatA[x][y] MatA[x] MatA x y MatB[y] MatB y System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
}
} public class Main{
public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
}
} Main
import java.io.*;

public class Main{
public static void main(String[] args) throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String[] str = br.readLine().split(" ");
	int n = Integer.parseInt(str[0]);
	int m = Integer.parseInt(str[1]);
	int[][] MatA = new int[n][m];
	int[] MatB = new int[m];
	int ans;

	for(int i = 0; i < n; i++){
		String[] strx = br.readLine().split(" ");
		for(int j = 0; j < m; j++){
			MatA[i][j] = Integer.parseInt(strx[j]);
		}
	}

	for(int k = 0; k < m; k++){
		MatB[k] = Integer.parseInt(br.readLine());
	}

	for(int x = 0; x < n; x ++){
		ans = 0;
		for(int y = 0; y < m; y++){
			ans += MatA[x][y] * MatB[y];
		}
		System.out.println(ans);
	}
}
}