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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    }
} 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    }
} 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    } 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    } 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[] result = new int[n]; result new int[n] n for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        } {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        } for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                int num = scanner.nextInt();
                a[i][j] = num;
            } {
                int num = scanner.nextInt();
                a[i][j] = num;
            } int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner a[i][j] = num a[i][j] a[i] a i j num for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        } int j=0; int j=0; j 0 j<m j m j++ j++ j {
            int num = scanner.nextInt();
            b[j] = num;
        } {
            int num = scanner.nextInt();
            b[j] = num;
        } int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner b[j] = num b[j] b j num for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        } {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        } for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                result[i] += a[i][j] * b[j];
            } {
                result[i] += a[i][j] * b[j];
            } result[i] += a[i][j] * b[j] result[i] result i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        } int i=0; int i=0; i 0 i<result.length i result.length result result.length i++ i++ i {
            System.out.println(result[i]);
        } {
            System.out.println(result[i]);
        } System.out.println(result[i]) System.out.println System.out System System.out result[i] result i 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    }
} 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    }
} 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[] result = new int[n];
        
        // input
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                int num = scanner.nextInt();
                a[i][j] = num;
            }
        }
        for(int j=0; j<m; j++) {
            int num = scanner.nextInt();
            b[j] = num;
        }
        
        // calc
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                result[i] += a[i][j] * b[j];
            }
        }
        
        // display
        for(int i=0; i<result.length; i++) {
            System.out.println(result[i]);
        }
        
    }
}
