import java.io.*;

class Main
{
    public static void main (String[ ] args) throws Exception
    {
        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];

        for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        }
        
        for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        }
        
        for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} import java.io.*; io.* java class Main
{
    public static void main (String[ ] args) throws Exception
    {
        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];

        for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        }
        
        for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        }
        
        for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
} Main public static void main (String[ ] args) throws Exception
    {
        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];

        for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        }
        
        for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        }
        
        for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        }
    } 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];

        for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        }
        
        for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        }
        
        for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        }
    } 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 for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        } {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        } String str2[] = br.readLine().split(" "); str2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a[i][j] = Integer.parseInt(str2[j]);
            } {
                a[i][j] = Integer.parseInt(str2[j]);
            } a[i][j] = Integer.parseInt(str2[j]) a[i][j] a[i] a i j Integer.parseInt(str2[j]) Integer.parseInt Integer str2[j] str2 j for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        } int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        } {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        } String str3 = br.readLine(); str3 br.readLine() br.readLine br b[k] = Integer.parseInt(str3) b[k] b k Integer.parseInt(str3) Integer.parseInt Integer str3 for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        } {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        } int ans = 0; ans 0 for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                ans += a[i][j] * b[j];
            } {
                ans += a[i][j] * b[j];
            } ans += a[i][j] * b[j] ans a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(ans) System.out.println System.out System System.out ans String[ ] args args
import java.io.*;

class Main
{
    public static void main (String[ ] args) throws Exception
    {
        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];

        for(int i = 0; i < n; i++)
        {
            String str2[] = br.readLine().split(" ");
            for(int j = 0; j < m; j++)
            {
                a[i][j] = Integer.parseInt(str2[j]);
            }
        }
        
        for(int k = 0; k < m; k++)
        {
            String str3 = br.readLine();
            b[k] = Integer.parseInt(str3);
        }
        
        for(int i = 0; i < n; i++)
        {
            int ans = 0;
            for(int j = 0; j < m; j++)
            {
                ans += a[i][j] * b[j];
            }
            System.out.println(ans);
        }
    }
}