import java.util.Scanner;
/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		int n=as.nextInt();
		int m=as.nextInt();
		int i,j,k;
		int b,f,r,v;
		
		int mat[][];
		mat = new int[n][m];
		int vec[];
		vec = new int[m];
		int mul[];
		mul = new int[n];
		String str;
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		}
		for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		}
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		}
		

	}

} import java.util.Scanner; Scanner java.util class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		int n=as.nextInt();
		int m=as.nextInt();
		int i,j,k;
		int b,f,r,v;
		
		int mat[][];
		mat = new int[n][m];
		int vec[];
		vec = new int[m];
		int mul[];
		mul = new int[n];
		String str;
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		}
		for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		}
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		}
		

	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		int n=as.nextInt();
		int m=as.nextInt();
		int i,j,k;
		int b,f,r,v;
		
		int mat[][];
		mat = new int[n][m];
		int vec[];
		vec = new int[m];
		int mul[];
		mul = new int[n];
		String str;
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		}
		for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		}
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		}
		

	} main {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		int n=as.nextInt();
		int m=as.nextInt();
		int i,j,k;
		int b,f,r,v;
		
		int mat[][];
		mat = new int[n][m];
		int vec[];
		vec = new int[m];
		int mul[];
		mul = new int[n];
		String str;
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		}
		for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		}
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		}
		

	} Scanner as = new Scanner(System.in); as new Scanner(System.in) int n=as.nextInt(); n as.nextInt() as.nextInt as int m=as.nextInt(); m as.nextInt() as.nextInt as int i i j j k; k int b b f f r r v; v int mat[][]; mat mat = new int[n][m] mat new int[n][m] n m int vec[]; vec vec = new int[m] vec new int[m] m int mul[]; mul mul = new int[n] mul new int[n] n String str; str for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		} {
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		} for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				
				mat[i][j]=as.nextInt();
				
			} {
				
				mat[i][j]=as.nextInt();
				
			} mat[i][j]=as.nextInt() mat[i][j] mat[i] mat i j as.nextInt() as.nextInt as for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			
			vec[i]=as.nextInt();
			
		} {
			
			vec[i]=as.nextInt();
			
		} vec[i]=as.nextInt() vec[i] vec i as.nextInt() as.nextInt as for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		} {
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		} for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			} {
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			} mul[i]=mul[i]+(mat[i][j]*vec[j]) mul[i] mul i mul[i]+(mat[i][j]*vec[j]) mul[i] mul i (mat[i][j]*vec[j]) mat[i][j] mat[i] mat i j vec[j] vec j str=String.valueOf(mul[i]) str String.valueOf(mul[i]) String.valueOf String mul[i] mul i System.out.println(str) System.out.println System.out System System.out str String[] args args
import java.util.Scanner;
/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		int n=as.nextInt();
		int m=as.nextInt();
		int i,j,k;
		int b,f,r,v;
		
		int mat[][];
		mat = new int[n][m];
		int vec[];
		vec = new int[m];
		int mul[];
		mul = new int[n];
		String str;
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				
				mat[i][j]=as.nextInt();
				
			}
		}
		for(i=0;i<m;i++){
			
			vec[i]=as.nextInt();
			
		}
		
		for(i=0;i<n;i++){
			for(j=0;j<m;j++){
				mul[i]=mul[i]+(mat[i][j]*vec[j]);
			}
		    str=String.valueOf(mul[i]);
			System.out.println(str);
		}
		

	}

}