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[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	}
	
} 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[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner( System.in );
		
		int n	= sc.nextInt();
		int m	= sc.nextInt();
		
		int[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	} main {
		Scanner sc = new Scanner( System.in );
		
		int n	= sc.nextInt();
		int m	= sc.nextInt();
		
		int[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	} 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[][] 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++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		} {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		} for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				vectorA[i][j] = sc.nextInt();

			} {
				vectorA[i][j] = sc.nextInt();

			} vectorA[i][j] = sc.nextInt() vectorA[i][j] vectorA[i] vectorA i j sc.nextInt() sc.nextInt sc for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vectorB[i] = sc.nextInt();
			
		} {
			vectorB[i] = sc.nextInt();
			
		} vectorB[i] = sc.nextInt() vectorB[i] vectorB i sc.nextInt() sc.nextInt sc for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		} {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		} vectorC[i] = 0 vectorC[i] vectorC i 0 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 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 sc = new Scanner( System.in );
		
		int n	= sc.nextInt();
		int m	= sc.nextInt();
		
		int[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	}
	
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner( System.in );
		
		int n	= sc.nextInt();
		int m	= sc.nextInt();
		
		int[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	}
	
} 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[][] vectorA = new int[n][m];
		int[]	vectorB = new int[m];
		int[]	vectorC = new int[n];
		
		// input
		for( int i = 0; i < n; i++ ) {
			for( int j = 0; j < m; j++ ) {
				vectorA[i][j] = sc.nextInt();

			}
			
		}
		
		// input
		for( int i = 0; i < m; i++ ) {
			vectorB[i] = sc.nextInt();
			
		}
		
		// calc and output
		for( int i = 0; i < n; i++ ) {
			vectorC[i] = 0;
			for( int j = 0; j < m; j++ ) {	
				vectorC[i] += ( vectorA[i][j] * vectorB[j] );
				
			}
			
			System.out.println( vectorC[i] );
		}
		
		
		
		
	}
	
}