import java.util.Arrays;
import java.util.Scanner;



public class Main{


	public static void main(String[] args){

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();
		int m=scan.nextInt();

		int[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner 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[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	}

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

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();
		int m=scan.nextInt();

		int[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	} main {

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();
		int m=scan.nextInt();

		int[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	} 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[][] matrix_nm=new int[n][m]; matrix_nm new int[n][m] n m int[] matrix_m1=new int[m]; matrix_m1 new int[m] m int[] matrix_n1=new int[n]; matrix_n1 new int[n] n Arrays.fill(matrix_n1, 0) Arrays.fill Arrays matrix_n1 0 for(int i=0;i<n;i++){
		  for(int j=0;j<m;j++){
			matrix_nm[i][j]=scan.nextInt();
		  }
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
		  for(int j=0;j<m;j++){
			matrix_nm[i][j]=scan.nextInt();
		  }
		} {
		  for(int j=0;j<m;j++){
			matrix_nm[i][j]=scan.nextInt();
		  }
		} for(int j=0;j<m;j++){
			matrix_nm[i][j]=scan.nextInt();
		  } int j=0; int j=0; j 0 j<m j m j++ j++ j {
			matrix_nm[i][j]=scan.nextInt();
		  } {
			matrix_nm[i][j]=scan.nextInt();
		  } matrix_nm[i][j]=scan.nextInt() matrix_nm[i][j] matrix_nm[i] matrix_nm i j scan.nextInt() scan.nextInt scan for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		} int j=0; int j=0; j 0 j<m j m j++ j++ j {
			matrix_m1[j]=scan.nextInt();
		} {
			matrix_m1[j]=scan.nextInt();
		} matrix_m1[j]=scan.nextInt() matrix_m1[j] matrix_m1 j scan.nextInt() scan.nextInt scan for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		} int j=0; int j=0; j 0 j<n j n j++ j++ j {
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		} {
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		} for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  } int i=0; int i=0; i 0 i<m i m i++ i++ i {
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  } {
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  } matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i] matrix_n1[j] matrix_n1 j matrix_nm[j][i]*matrix_m1[i] matrix_nm[j][i] matrix_nm[j] matrix_nm j i matrix_m1[i] matrix_m1 i System.out.println(matrix_n1[j]) System.out.println System.out System System.out matrix_n1[j] matrix_n1 j scan.close() scan.close scan 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[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	}

} public class Main{


	public static void main(String[] args){

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();
		int m=scan.nextInt();

		int[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	}

} Main
import java.util.Arrays;
import java.util.Scanner;



public class Main{


	public static void main(String[] args){

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();
		int m=scan.nextInt();

		int[][] matrix_nm=new int[n][m];
		int[] matrix_m1=new int[m];
		int[] matrix_n1=new int[n];
		Arrays.fill(matrix_n1, 0);

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

		for(int j=0;j<m;j++){
			matrix_m1[j]=scan.nextInt();
		}

		for(int j=0;j<n;j++){
		  for(int i=0;i<m;i++){
			matrix_n1[j]+=matrix_nm[j][i]*matrix_m1[i];
		  }System.out.println(matrix_n1[j]);
		}

		scan.close();
	}

}