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

class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[][] A = new int[n][m];
        int[] B = new int[m];
        
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        }
        
        int[] result = new int[n];
        
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        }
        
        
        for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[][] A = new int[n][m];
        int[] B = new int[m];
        
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        }
        
        int[] result = new int[n];
        
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        }
        
        
        for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        }
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[][] A = new int[n][m];
        int[] B = new int[m];
        
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        }
        
        int[] result = new int[n];
        
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        }
        
        
        for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[][] A = new int[n][m];
        int[] B = new int[m];
        
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        }
        
        int[] result = new int[n];
        
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        }
        
        
        for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc 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++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                A[i][j] = sc.nextInt();
            } {
                A[i][j] = sc.nextInt();
            } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            B[i] = sc.nextInt();
        } {
            B[i] = sc.nextInt();
        } B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int[] result = new int[n]; result new int[n] n for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        } {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        } for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                result[i] += A[i][j] * B[j];
            } {
                result[i] += A[i][j] * B[j];
            } result[i] += A[i][j] * B[j] result[i] result i A[i][j] * B[j] A[i][j] A[i] A i j B[j] B j for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(result[i]);
        } {
            System.out.println(result[i]);
        } System.out.println(result[i]) System.out.println System.out System System.out result[i] result i String[] args args
import java.io.*;
import java.util.*;

class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[][] A = new int[n][m];
        int[] B = new int[m];
        
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            B[i] = sc.nextInt();
        }
        
        int[] result = new int[n];
        
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result[i] += A[i][j] * B[j];
            }
        }
        
        
        for (int i = 0; i < n; i++) {
            System.out.println(result[i]);
        }
    }
}