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