import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int[][] arr1 = new int[n][m]; arr1 new int[n][m] n m for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		} {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		} for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				arr1[i][j] = scanner.nextInt();
			} {
				arr1[i][j] = scanner.nextInt();
			} arr1[i][j] = scanner.nextInt() arr1[i][j] arr1[i] arr1 i j scanner.nextInt() scanner.nextInt scanner int[] arr2 = new int[m]; arr2 new int[m] m for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			arr2[i] = scanner.nextInt();
		} {
			arr2[i] = scanner.nextInt();
		} arr2[i] = scanner.nextInt() arr2[i] arr2 i scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int[] arr3 = new int[n]; arr3 new int[n] n for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		} {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		} arr3[i] = 0 arr3[i] arr3 i 0 for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				arr3[i] += arr1[i][j]*arr2[j]; 
			} {
				arr3[i] += arr1[i][j]*arr2[j]; 
			} arr3[i] += arr1[i][j]*arr2[j] arr3[i] arr3 i arr1[i][j]*arr2[j] arr1[i][j] arr1[i] arr1 i j arr2[j] arr2 j System.out.println(arr3[i]) System.out.println System.out System System.out arr3[i] arr3 i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] arr1 = new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr1[i][j] = scanner.nextInt();
			}
		}
		int[] arr2 = new int[m];
		for(int i=0;i<m;i++) {
			arr2[i] = scanner.nextInt();
		}
		scanner.close();
		int[] arr3 = new int[n];
		for(int i=0;i<n;i++) {
			arr3[i] = 0;
			for(int j=0;j<m;j++) {
				arr3[i] += arr1[i][j]*arr2[j]; 
			}
			System.out.println(arr3[i]);
		}
	}
}
