import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

    protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    }

    static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

    protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    }

    static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} Main protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    } process {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() final String[] lines = splitForLines(data); lines splitForLines(data) splitForLines data final int[] split = split(lines[0]); split split(lines[0]) split lines[0] lines 0 final int rows = split[0]; rows split[0] split 0 final int columns = split[1]; columns split[1] split 1 final int[][] matrix = new int[rows][columns]; matrix new int[rows][columns] rows columns final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows); matrixLines Arrays.copyOfRange(lines, 1, 1 + rows) Arrays.copyOfRange Arrays lines 1 1 + rows 1 rows for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        } int i = 0; int i = 0; i 0 i < matrixLines.length i matrixLines.length matrixLines matrixLines.length i++ i++ i {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        } {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        } final int[] array = split(matrixLines[i]); array split(matrixLines[i]) split matrixLines[i] matrixLines i System.arraycopy(array, 0, matrix[i], 0, array.length) System.arraycopy System array 0 matrix[i] matrix i 0 array.length array array.length final int[] vector = new int[columns]; vector new int[columns] columns final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length); vectorLines Arrays.copyOfRange(lines, 1 + rows, lines.length) Arrays.copyOfRange Arrays lines 1 + rows 1 rows lines.length lines lines.length for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        } int i = 0; int i = 0; i 0 i < vectorLines.length i vectorLines.length vectorLines vectorLines.length i++ i++ i {
            vector[i] = Integer.parseInt(vectorLines[i]);
        } {
            vector[i] = Integer.parseInt(vectorLines[i]);
        } vector[i] = Integer.parseInt(vectorLines[i]) vector[i] vector i Integer.parseInt(vectorLines[i]) Integer.parseInt Integer vectorLines[i] vectorLines i final int[] result = multiply(matrix, vector); result multiply(matrix, vector) multiply matrix vector for (int i : result) {
            sb.append(i).append('\n');
        } int i result {
            sb.append(i).append('\n');
        } {
            sb.append(i).append('\n');
        } sb.append(i).append('\n') sb.append(i).append sb.append(i) sb.append sb i '\n' return sb.toString(); sb.toString() sb.toString sb String data data static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    } multiply {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    } int[] result = new int[matrix.length]; result new int[matrix.length] matrix.length matrix matrix.length for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        } int i = 0; int i = 0; i 0 i < matrix.length i matrix.length matrix matrix.length i++ i++ i {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        } {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        } for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            } int j = 0; int j = 0; j 0 j < matrix[i].length j matrix[i].length matrix[i] matrix i matrix[i].length j++ j++ j {
                result[i] += matrix[i][j] * vector[j];
            } {
                result[i] += matrix[i][j] * vector[j];
            } result[i] += matrix[i][j] * vector[j] result[i] result i matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j return result; result int[][] matrix matrix int[] vector vector private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } readAll {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } InputStreamReader r = null; r null BufferedReader br = null; br null try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        } IOException e {
            throw new RuntimeException(e);
        } throw new RuntimeException(e); new RuntimeException(e) {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } br != null br null {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } try {
                    br.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    br.close();
                } br.close() br.close br if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } r != null r null {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } try {
                    r.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    r.close();
                } r.close() r.close r {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } r = new InputStreamReader(is) r new InputStreamReader(is) br = new BufferedReader(r) br new BufferedReader(r) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String s; s while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            } (s = br.readLine()) != null (s = br.readLine()) s br.readLine() br.readLine br null {
                sb.append(s).append('\n');
            } sb.append(s).append('\n') sb.append(s).append sb.append(s) sb.append sb s '\n' return sb.toString(); sb.toString() sb.toString sb InputStream is is private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    } splitForLines {
        return lines.split("\\n");
    } return lines.split("\\n"); lines.split("\\n") lines.split lines "\\n" String lines lines private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    } split {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    } final String[] s0 = s.split(" "); s0 s.split(" ") s.split s " " int[] ia = new int[s0.length]; ia new int[s0.length] s0.length s0 s0.length for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        } int i = 0; int i = 0; i 0 i < s0.length i s0.length s0 s0.length i++ i++ i {
            ia[i] = Integer.parseInt(s0[i]);
        } {
            ia[i] = Integer.parseInt(s0[i]);
        } ia[i] = Integer.parseInt(s0[i]) ia[i] ia i Integer.parseInt(s0[i]) Integer.parseInt Integer s0[i] s0 i return ia; ia String s s public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    } main {
        System.out.print(process(readAll(System.in)));
    } System.out.print(process(readAll(System.in))) System.out.print System.out System System.out process(readAll(System.in)) process readAll(System.in) readAll System.in System System.in String[] args args public class Main {

    protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    }

    static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} public class Main {

    protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    }

    static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

    protected static String process(String data) {
        StringBuilder sb = new StringBuilder();
        final String[] lines = splitForLines(data);

        final int[] split = split(lines[0]);
        final int rows = split[0];
        final int columns = split[1];

        final int[][] matrix = new int[rows][columns];
        final String[] matrixLines = Arrays.copyOfRange(lines, 1, 1 + rows);
        for (int i = 0; i < matrixLines.length; i++) {
            final int[] array = split(matrixLines[i]);

//            for (int j = 0; j < array.length; j++) {
//                matrix[i][j] = array[j];
//            }
            System.arraycopy(array, 0, matrix[i], 0, array.length);
        }

        final int[] vector = new int[columns];
        final String[] vectorLines = Arrays.copyOfRange(lines, 1 + rows, lines.length);
        for (int i = 0; i < vectorLines.length; i++) {
            vector[i] = Integer.parseInt(vectorLines[i]);
        }

        final int[] result = multiply(matrix, vector);

        for (int i : result) {
            sb.append(i).append('\n');
        }

        return sb.toString();
    }

    static int[] multiply(int[][] matrix, int[] vector) {
        int[] result = new int[matrix.length];

        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                result[i] += matrix[i][j] * vector[j];
            }
        }

        return result;
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
}