import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        int n,m,i,j,h,k;
        n = input.nextInt();
		m = input.nextInt();
        int[][] a = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		}
        for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        }
        for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        }
        for (i=0;i<n;i++){
            System.out.println(c[i]);
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        int n,m,i,j,h,k;
        n = input.nextInt();
		m = input.nextInt();
        int[][] a = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		}
        for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        }
        for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        }
        for (i=0;i<n;i++){
            System.out.println(c[i]);
        }
    }
} Main public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        int n,m,i,j,h,k;
        n = input.nextInt();
		m = input.nextInt();
        int[][] a = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		}
        for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        }
        for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        }
        for (i=0;i<n;i++){
            System.out.println(c[i]);
        }
    } main {
        Scanner input=new Scanner(System.in);
        int n,m,i,j,h,k;
        n = input.nextInt();
		m = input.nextInt();
        int[][] a = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		}
        for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        }
        for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        }
        for (i=0;i<n;i++){
            System.out.println(c[i]);
        }
    } Scanner input=new Scanner(System.in); input new Scanner(System.in) int n n m m i i j j h h k; k n = input.nextInt() n input.nextInt() input.nextInt input m = input.nextInt() m input.nextInt() input.nextInt input int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		} i=0; i=0 i 0 i<n i n i++ i++ i {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		} {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		} for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            } j=0; j=0 j 0 j<m j m j++ j++ j {
            h=input.nextInt();
            a[i][j]=h;
            } {
            h=input.nextInt();
            a[i][j]=h;
            } h=input.nextInt() h input.nextInt() input.nextInt input a[i][j]=h a[i][j] a[i] a i j h for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        } j=0; j=0 j 0 j<m j m j++ j++ j {
            k=input.nextInt();
            b[j]=k;
        } {
            k=input.nextInt();
            b[j]=k;
        } k=input.nextInt() k input.nextInt() input.nextInt input b[j]=k b[j] b j k for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        } {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        } c[i]=0 c[i] c i 0 for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            } j=0; j=0 j 0 j<m j m j++ j++ j {
            c[i]+=a[i][j]*b[j];
            } {
            c[i]+=a[i][j]*b[j];
            } c[i]+=a[i][j]*b[j] c[i] c i a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j for (i=0;i<n;i++){
            System.out.println(c[i]);
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            System.out.println(c[i]);
        } {
            System.out.println(c[i]);
        } System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        int n,m,i,j,h,k;
        n = input.nextInt();
		m = input.nextInt();
        int[][] a = new int[n][m];
		int[] b = new int[m];
		int[] c = new int[n];
		for(i=0;i<n;i++) {
        for (j=0;j<m;j++){
            h=input.nextInt();
            a[i][j]=h;
            }
		}
        for(j=0;j<m;j++){
            k=input.nextInt();
            b[j]=k;
        }
        for (i=0;i<n;i++) {
            c[i]=0;
        for(j=0;j<m;j++){
            c[i]+=a[i][j]*b[j];
            }
        }
        for (i=0;i<n;i++){
            System.out.println(c[i]);
        }
    }
}
