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 vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[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 vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[i]);
		}
	}

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[i]);
		}
	} main {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[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 vecnm[][] = new int[n][m]; vecnm new int[n][m] n m int i i j; j int vec[] = new int[m]; vec new int[m] m int veca[] = new int[n]; veca new int[n] n for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		} {
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		} for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				vecnm[i][j] = sc.nextInt();
			} {
				vecnm[i][j] = sc.nextInt();
			} vecnm[i][j] = sc.nextInt() vecnm[i][j] vecnm[i] vecnm i j sc.nextInt() sc.nextInt sc for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			vec[i] = sc.nextInt();
		} {
			vec[i] = sc.nextInt();
		} vec[i] = sc.nextInt() vec[i] vec i sc.nextInt() sc.nextInt sc sc.close() sc.close sc for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		} {
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		} for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				veca[i] += (vecnm[i][j]*vec[j]);
			} {
				veca[i] += (vecnm[i][j]*vec[j]);
			} veca[i] += (vecnm[i][j]*vec[j]) veca[i] veca i (vecnm[i][j]*vec[j]) vecnm[i][j] vecnm[i] vecnm i j vec[j] vec j for(i=0;i<n;i++){
			System.out.println(veca[i]);
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			System.out.println(veca[i]);
		} {
			System.out.println(veca[i]);
		} System.out.println(veca[i]) System.out.println System.out System System.out veca[i] veca 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 vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[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 vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[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 vecnm[][] = new int[n][m];
		int i,j;
		int vec[] = new int[m];
		int veca[] = new int[n];
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				vecnm[i][j] = sc.nextInt();
			}
		}
		for(i=0;i<m;i++){
			vec[i] = sc.nextInt();
		}
		sc.close();
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				veca[i] += (vecnm[i][j]*vec[j]);
			}
		}
		for(i=0;i<n;i++){
			System.out.println(veca[i]);
		}
	}

}

