import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	}
} Main public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	} 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[][] vectorA = new int[n][m]; vectorA new int[n][m] n m int[] vectorB = new int[m]; vectorB new int[m] m int[] vectorC = new int[n]; vectorC new int[n] n for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		} {
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		} for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			} {
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			} int elm = scan.nextInt(); elm scan.nextInt() scan.nextInt scan vectorA[i][j] = elm vectorA[i][j] vectorA[i] vectorA i j elm for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int elm = scan.nextInt();
			vectorB[i] = elm;
		} {
			int elm = scan.nextInt();
			vectorB[i] = elm;
		} int elm = scan.nextInt(); elm scan.nextInt() scan.nextInt scan vectorB[i] = elm vectorB[i] vectorB i elm for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		} {
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		} for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				vectorC[i] += vectorA[i][j] * vectorB[j];
			} {
				vectorC[i] += vectorA[i][j] * vectorB[j];
			} vectorC[i] += vectorA[i][j] * vectorB[j] vectorC[i] vectorC i vectorA[i][j] * vectorB[j] vectorA[i][j] vectorA[i] vectorA i j vectorB[j] vectorB j for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(vectorC[i]);
		} {
			System.out.println(vectorC[i]);
		} System.out.println(vectorC[i]) System.out.println System.out System System.out vectorC[i] vectorC i String[] args args public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	}
} public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] vectorA = new int[n][m];
		int[] vectorB = new int[m];
		int[] vectorC = new int[n];
		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				int elm = scan.nextInt();
				vectorA[i][j] = elm;
				//if(j == m -1){
					//String ent = scan.next();
				//}
			}
		}
		for(int i = 0; i < m; i++){
			int elm = scan.nextInt();
			vectorB[i] = elm;
		}

		for(int i = 0; i < n; i++){
			for(int j = 0; j < m; j++){
				vectorC[i] += vectorA[i][j] * vectorB[j];
			}
		}

		for(int i = 0; i < n; i++){
			System.out.println(vectorC[i]);
		}
	}
}