import java.util.*;
import java.util.stream.*;
class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,m;
        n = input.nextInt();
        m = input.nextInt();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        }
        int[] vec = new int[m];
        for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        }
        for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        }
    }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,m;
        n = input.nextInt();
        m = input.nextInt();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        }
        int[] vec = new int[m];
        for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        }
        for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        }
    }
} Main public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,m;
        n = input.nextInt();
        m = input.nextInt();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        }
        int[] vec = new int[m];
        for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        }
        for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        }
    } main {
        Scanner input = new Scanner(System.in);
        int n,m;
        n = input.nextInt();
        m = input.nextInt();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        }
        int[] vec = new int[m];
        for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        }
        for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        }
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n n m; m n = input.nextInt() n input.nextInt() input.nextInt input m = input.nextInt() m input.nextInt() input.nextInt input int[][] mat = new int[n][m]; mat new int[n][m] n m for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        } {
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        } for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                mat[i][j] = input.nextInt();
            } {
                mat[i][j] = input.nextInt();
            } mat[i][j] = input.nextInt() mat[i][j] mat[i] mat i j input.nextInt() input.nextInt input int[] vec = new int[m]; vec new int[m] m for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            vec[i] = input.nextInt();
        } {
            vec[i] = input.nextInt();
        } vec[i] = input.nextInt() vec[i] vec i input.nextInt() input.nextInt input int[] ans = new int[n]; ans new int[n] n for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        } {
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        } for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                ans[i] += (mat[i][j] * vec[j]);
            } {
                ans[i] += (mat[i][j] * vec[j]);
            } ans[i] += (mat[i][j] * vec[j]) ans[i] ans i (mat[i][j] * vec[j]) mat[i][j] mat[i] mat i j vec[j] vec j for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(ans[i]);
        } {
            System.out.println(ans[i]);
        } System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args
import java.util.*;
import java.util.stream.*;
class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,m;
        n = input.nextInt();
        m = input.nextInt();
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                mat[i][j] = input.nextInt();
            }
        }
        int[] vec = new int[m];
        for (int i = 0; i < m; i++){
            vec[i] = input.nextInt();
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                ans[i] += (mat[i][j] * vec[j]);
            }
        }
        for (int i = 0; i < n; i++){
            System.out.println(ans[i]);
        }
    }
}
