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

public class Main {
	public static void main(String[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	}
} 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[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	}
} Main public static void main(String[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuffer sb = new StringBuffer(); sb new StringBuffer() String[] Ginput = br.readLine().split(" "); Ginput br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(Ginput[0]); n Integer.parseInt(Ginput[0]) Integer.parseInt Integer Ginput[0] Ginput 0 int m = Integer.parseInt(Ginput[1]); m Integer.parseInt(Ginput[1]) Integer.parseInt Integer Ginput[1] Ginput 1 int i = 0; i 0 int j = 0; j 0 int matrix[][] = new int[n][m]; matrix new int[n][m] n m int mul[] = new int[m]; mul new int[m] m int ans[] = new int[n]; ans new int[n] n for( i=0 ; i<n ; i++ ){
			String[] input = br.readLine().split(" ");
			for( j=0 ; j<m ; j++ ){
				matrix[i][j]=Integer.parseInt(input[j]);
			}
		} i=0 ; i=0 i 0 i<n i n i++ i++ i {
			String[] input = br.readLine().split(" ");
			for( j=0 ; j<m ; j++ ){
				matrix[i][j]=Integer.parseInt(input[j]);
			}
		} {
			String[] input = br.readLine().split(" ");
			for( j=0 ; j<m ; j++ ){
				matrix[i][j]=Integer.parseInt(input[j]);
			}
		} String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for( j=0 ; j<m ; j++ ){
				matrix[i][j]=Integer.parseInt(input[j]);
			} j=0 ; j=0 j 0 j<m j m j++ j++ j {
				matrix[i][j]=Integer.parseInt(input[j]);
			} {
				matrix[i][j]=Integer.parseInt(input[j]);
			} matrix[i][j]=Integer.parseInt(input[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(input[j]) Integer.parseInt Integer input[j] input j for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		} i=0 ; i=0 i 0 i<m i m i++ i++ i {
			mul[i] = Integer.parseInt(br.readLine());
		} {
			mul[i] = Integer.parseInt(br.readLine());
		} mul[i] = Integer.parseInt(br.readLine()) mul[i] mul i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		} i=0 ; i=0 i 0 i<n i n i++ i++ i {
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		} {
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		} for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			} j=0 ; j=0 j 0 j<m j m j++ j++ j {
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			} {
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			} int k = matrix[i][j] * mul[j]; k matrix[i][j] * mul[j] matrix[i][j] matrix[i] matrix i j mul[j] mul j ans[i] = ans[i] + k ans[i] ans i ans[i] + k ans[i] ans i k sb.append(Integer.toString(ans[i])).append("\n") sb.append(Integer.toString(ans[i])).append sb.append(Integer.toString(ans[i])) sb.append sb Integer.toString(ans[i]) Integer.toString Integer ans[i] ans i "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] age age public class Main {
	public static void main(String[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	}
} public class Main {
	public static void main(String[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] age) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();

		String[] Ginput = br.readLine().split(" ");
		int n = Integer.parseInt(Ginput[0]);
		int m = Integer.parseInt(Ginput[1]);
		int i = 0;
		int j = 0;
		int matrix[][] = new int[n][m];
		int mul[] = new int[m];
		int ans[] = new int[n];

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

		for( i=0 ; i<m ; i++ ){
			mul[i] = Integer.parseInt(br.readLine());
		}

		for( i=0 ; i<n ; i++ ){
			for( j=0 ; j<m ; j++ ){
				int k = matrix[i][j] * mul[j];
				ans[i] = ans[i] + k;
			}
			sb.append(Integer.toString(ans[i])).append("\n");
		}

		System.out.print(sb);
	}
}