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 str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    }
} 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 str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int a[][] = new int[n][m]; a new int[n][m] n m int b[] = new int[m]; b new int[m] m int c[] = new int[n]; c new int[n] n for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        } {
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        } str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                a[i][j] = Integer.parseInt(str[j]);
            } {
                a[i][j] = Integer.parseInt(str[j]);
            } a[i][j] = Integer.parseInt(str[j]) a[i][j] a[i] a i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            b[i] = Integer.parseInt(br.readLine());
        } {
            b[i] = Integer.parseInt(br.readLine());
        } b[i] = Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        } {
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        } for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                c[i] = c[i] + a[i][j] * b[j];
            } {
                c[i] = c[i] + a[i][j] * b[j];
            } c[i] = c[i] + a[i][j] * b[j] c[i] c i c[i] + a[i][j] * b[j] c[i] c i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    }
} 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 str[] = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int a[][] = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        for(int i=0;i<n;i++){
            str = br.readLine().split(" ");
            for(int j=0;j<m;j++){
                a[i][j] = Integer.parseInt(str[j]);
            }
        }
        for(int i=0;i<m;i++){
            b[i] = Integer.parseInt(br.readLine());
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                c[i] = c[i] + a[i][j] * b[j];
            }
            System.out.println(c[i]);
        }
    }
}