import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} Main public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br String[] strArray = input.split(" "); strArray input.split(" ") input.split input " " int n = Integer.parseInt(strArray[0]); n Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 int m = Integer.parseInt(strArray[1]); m Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 int[][] A = new int[n][m]; A new int[n][m] n m int[] b = new int[m]; b new int[m] m for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        } int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i++ i++ i {
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        } {
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        } input = br.readLine() input br.readLine() br.readLine br strArray = input.split(" ") strArray input.split(" ") input.split input " " for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            } int j = 0; int j = 0; j 0 j < A[i].length j A[i].length A[i] A i A[i].length j++ j++ j {
                A[i][j] = Integer.parseInt(strArray[j]);
            } {
                A[i][j] = Integer.parseInt(strArray[j]);
            } A[i][j] = Integer.parseInt(strArray[j]) A[i][j] A[i] A i j Integer.parseInt(strArray[j]) Integer.parseInt Integer strArray[j] strArray j for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        } int i = 0; int i = 0; i 0 i < b.length i b.length b b.length i++ i++ i {
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        } {
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        } input = br.readLine() input br.readLine() br.readLine br b[i] = Integer.parseInt(input) b[i] b i Integer.parseInt(input) Integer.parseInt Integer input for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        } int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i++ i++ i {
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        } {
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        } int ans = 0; ans 0 for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            } int j = 0; int j = 0; j 0 j < A[i].length j A[i].length A[i] A i A[i].length j++ j++ j {
                ans += A[i][j] * b[j];
            } {
                ans += A[i][j] * b[j];
            } ans += A[i][j] * b[j] ans A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] strArray = input.split(" ");
        int n = Integer.parseInt(strArray[0]);  //n???
        int m = Integer.parseInt(strArray[1]);  //m???

        int[][] A = new int[n][m];
        int[] b = new int[m];

//      ?????????????????????A????????????????????????
        for(int i = 0; i < A.length; i++){
            input = br.readLine();
            strArray = input.split(" ");
            for(int j = 0; j < A[i].length; j++){
                A[i][j] = Integer.parseInt(strArray[j]);
            }
        }

//      ?????????????????????b?????????????????????
        for(int i = 0; i < b.length; i++){
            input = br.readLine();
            b[i] = Integer.parseInt(input);
        }

//      A??¨b??????????¨??????????
        for(int i = 0; i < A.length; i++){
            int ans = 0;
            for(int j = 0; j < A[i].length; j++){
                ans += A[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
}