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

 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 A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    } 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 A[][] = new int[n][m]; A new int[n][m] n m int b[] = new int[m]; b new int[m] m int i i j j c; c for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        } {
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        } for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            } j=0; j=0 j 0 j<m j m j++ j++ j {
                A[i][j] = sc.nextInt();
            } {
                A[i][j] = sc.nextInt();
            } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        } j=0; j=0 j 0 j<m j m j++ j++ j {
            b[j] = sc.nextInt();
        } {
            b[j] = sc.nextInt();
        } b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        } {
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        } c = 0 c 0 for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            } j=0; j=0 j 0 j<m j m j++ j++ j {
                c += ( A[i][j] * b[j] );
            } {
                c += ( A[i][j] * b[j] );
            } c += ( A[i][j] * b[j] ) c ( A[i][j] * b[j] ) A[i][j] A[i] A i j b[j] b j System.out.println(c) System.out.println System.out System System.out c 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 A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    }
} public class Main {
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    }
} 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 A[][] = new int[n][m];
        int b[] = new int[m];
        int i,j,c;
        
        for(i=0; i<n; i++){
            for(j=0; j<m; j++){
                A[i][j] = sc.nextInt();
            }
        }
        
        for(j=0; j<m; j++){
            b[j] = sc.nextInt();
        }
        
        for(i=0; i<n; i++){
            c = 0;
            for(j=0; j<m; j++){
                c += ( A[i][j] * b[j] );
            }
            System.out.println(c);
        }
    }
}


