import java.util.Scanner;

public class Main {
    
    public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    }
    
    private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    }
    
    private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    }
} Main public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    } main {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] nm = scanner.nextLine().split(" "); nm scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int n = Integer.parseInt(nm[0]); n Integer.parseInt(nm[0]) Integer.parseInt Integer nm[0] nm 0 int m = Integer.parseInt(nm[1]); m Integer.parseInt(nm[1]) Integer.parseInt Integer nm[1] nm 1 int[][] matrixA = new int[n][m]; matrixA new int[n][m] n m for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        } {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        } String[] line = scanner.nextLine().split(" "); line scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                matrixA[i][j] = Integer.parseInt(line[j]);
            } {
                matrixA[i][j] = Integer.parseInt(line[j]);
            } matrixA[i][j] = Integer.parseInt(line[j]) matrixA[i][j] matrixA[i] matrixA i j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j int[] matrixB = new int[m]; matrixB new int[m] m for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        } {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        } matrixB[i] = Integer.parseInt(scanner.nextLine()) matrixB[i] matrixB i Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner calcMatrix(matrixA, matrixB, n, m) calcMatrix matrixA matrixB n m String... args args private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    } calcMatrix {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    } for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        } int i=0; int i=0; i 0 i < n i n i++ i++ i {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        } {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        } int sum = 0; sum 0 for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                sum += a[i][j] * b[j];
            } {
                sum += a[i][j] * b[j];
            } sum += a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(String.format("%d", sum)) System.out.println System.out System System.out String.format("%d", sum) String.format String "%d" sum int[][] a a int[] b b int n n int m m public class Main {
    
    public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    }
    
    private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    }
} public class Main {
    
    public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    }
    
    private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    }
} Main
import java.util.Scanner;

public class Main {
    
    public static void main (String... args) {
        
        Scanner scanner = new Scanner(System.in);
        
        String[] nm = scanner.nextLine().split(" ");
        int n = Integer.parseInt(nm[0]);
        int m = Integer.parseInt(nm[1]);
        
        int[][] matrixA = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] line = scanner.nextLine().split(" ");
            
            for (int j = 0; j < m; j++) {
                matrixA[i][j] = Integer.parseInt(line[j]);
            }
        }
        
        int[] matrixB = new int[m];
        for (int i = 0; i < m; i++) {
            matrixB[i] = Integer.parseInt(scanner.nextLine());
        }
        
        calcMatrix(matrixA, matrixB, n, m);
    }
    
    private static void calcMatrix(int[][] a, int[] b, int n, int m) {
        for (int i=0; i < n; i++) {
            int sum = 0;
            for (int j=0; j<m; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(String.format("%d", sum));
        }
    }
}
