import java.io.*;
import java.util.ArrayList;

public class Main{

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    }

} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util public class Main{

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    }

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    } main {

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    } int n = 0; n 0 int m = 0; m 0 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " n = Integer.parseInt(line[0]) n Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 m = Integer.parseInt(line[1]) m Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int num_a[][]; num_a num_a = new int[n][m] num_a new int[n][m] n m for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        } {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        } String[] line1 = br.readLine().split(" "); line1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            } int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
                num_a[i][x] = Integer.parseInt(line1[x]);
            } {
                num_a[i][x] = Integer.parseInt(line1[x]);
            } num_a[i][x] = Integer.parseInt(line1[x]) num_a[i][x] num_a[i] num_a i x Integer.parseInt(line1[x]) Integer.parseInt Integer line1[x] line1 x int num_b[]; num_b int num_c[]; num_c num_b = new int[m] num_b new int[m] m num_c = new int[n] num_c new int[n] n for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            num_b[i] = Integer.parseInt(br.readLine());
        } {
            num_b[i] = Integer.parseInt(br.readLine());
        } num_b[i] = Integer.parseInt(br.readLine()) num_b[i] num_b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        } {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        } for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            } int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
                num_c[i] += num_a[i][x] * num_b[x];
            } {
                num_c[i] += num_a[i][x] * num_b[x];
            } num_c[i] += num_a[i][x] * num_b[x] num_c[i] num_c i num_a[i][x] * num_b[x] num_a[i][x] num_a[i] num_a i x num_b[x] num_b x for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(num_c[i]);
        } {
            System.out.println(num_c[i]);
        } System.out.println(num_c[i]) System.out.println System.out System System.out num_c[i] num_c i String[] args args public class Main{

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    }

} public class Main{

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    }

} Main
import java.io.*;
import java.util.ArrayList;

public class Main{

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

        int n = 0;
        int m = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] line = br.readLine().split(" ");
        n = Integer.parseInt(line[0]);
        m = Integer.parseInt(line[1]);

        int num_a[][];
        num_a = new int[n][m];

        for (int i = 0; i < n; i++) {

            String[] line1 = br.readLine().split(" ");

            for (int x = 0; x < m; x++) {
                num_a[i][x] = Integer.parseInt(line1[x]);
            }

        }
        
        int num_b[];
        int num_c[];
        num_b = new int[m];
        num_c = new int[n];
        
        for(int i = 0; i < m; i++) {
            num_b[i] = Integer.parseInt(br.readLine());
        }
        
        
        for(int i = 0; i < n; i++) {
            
            for(int x = 0; x < m; x++) {
                num_c[i] += num_a[i][x] * num_b[x];
            }
           
        }
        
        for(int i = 0; i < n; i++) {
            System.out.println(num_c[i]);
        }
    }

}