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

public class Main {

    public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} 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) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } main {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String[] input = in.readLine().split(" "); input in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(input[0]); n Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int m = Integer.parseInt(input[1]); m Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 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 < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            } {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            } String[] aij = in.readLine().split(" "); aij in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                    A[i][j] = Integer.parseInt(aij[j]);
                } {
                    A[i][j] = Integer.parseInt(aij[j]);
                } A[i][j] = Integer.parseInt(aij[j]) A[i][j] A[i] A i j Integer.parseInt(aij[j]) Integer.parseInt Integer aij[j] aij j for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                b[i] = Integer.parseInt(in.readLine());
            } {
                b[i] = Integer.parseInt(in.readLine());
            } b[i] = Integer.parseInt(in.readLine()) b[i] b i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int[] c = new int[n]; c new int[n] n for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            } {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            } int[] a = A[i]; a A[i] A i int sum = 0; sum 0 for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                    sum = sum + a[j] * b[j];
                } {
                    sum = sum + a[j] * b[j];
                } sum = sum + a[j] * b[j] sum sum + a[j] * b[j] sum a[j] * b[j] a[j] a j b[j] b j c[i] = sum c[i] c i sum StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                sb.append(c[i]);
                sb.append("\n");
            } {
                sb.append(c[i]);
                sb.append("\n");
            } sb.append(c[i]) sb.append sb c[i] c i sb.append("\n") sb.append sb "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {

    public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} public class Main {

    public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
            String[] input = in.readLine().split(" ");
            int n = Integer.parseInt(input[0]);
            int m = Integer.parseInt(input[1]);
            int[][] A = new int[n][m];
            int[] b = new int[m];

            for (int i = 0; i < n; i++) {
                String[] aij = in.readLine().split(" ");
                for (int j = 0; j < m; j++) {
                    A[i][j] = Integer.parseInt(aij[j]);
                }
            }

            for (int i = 0; i < m; i++) {
                b[i] = Integer.parseInt(in.readLine());
            }

            int[] c = new int[n];
            for (int i = 0; i < n; i++) {
                int[] a = A[i];
                int sum = 0;
                for (int j = 0; j < m; j++) {
                    sum = sum + a[j] * b[j];
                }
                c[i] = sum;
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                sb.append(c[i]);
                sb.append("\n");
            }
            System.out.print(sb);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
