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