import java.util.Scanner;

public class Main{
    static Scanner scan = new  Scanner(System.in);
    public static void main(String [] args){
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    }
} import java.util.Scanner; Scanner java.util public class Main{
    static Scanner scan = new  Scanner(System.in);
    public static void main(String [] args){
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    }
} Main static Scanner scan = new  Scanner(System.in); scan new  Scanner(System.in) public static void main(String [] args){
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    } main {
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    } int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int [][] mtx = new int [n][m]; mtx new int [n][m] n m int [] mtx2 = new int [m]; mtx2 new int [m] m int [] ans = new int [n]; ans new int [n] n for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            } {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            } for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                    mtx[i][j] = scan.nextInt();
                } {
                    mtx[i][j] = scan.nextInt();
                } mtx[i][j] = scan.nextInt() mtx[i][j] mtx[i] mtx i j scan.nextInt() scan.nextInt scan for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                mtx2[i] = scan.nextInt();
            } {
                mtx2[i] = scan.nextInt();
            } mtx2[i] = scan.nextInt() mtx2[i] mtx2 i scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             } {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             } for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                } {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                } ans[i] += mtx[i][j] * mtx2[j] ans[i] ans i mtx[i][j] * mtx2[j] mtx[i][j] mtx[i] mtx i j mtx2[j] mtx2 j System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String [] args args public class Main{
    static Scanner scan = new  Scanner(System.in);
    public static void main(String [] args){
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    }
} public class Main{
    static Scanner scan = new  Scanner(System.in);
    public static void main(String [] args){
         
            int n = scan.nextInt(); int m = scan.nextInt();
            int [][] mtx = new int [n][m];
            int [] mtx2 = new int [m];
            int [] ans = new int [n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    mtx[i][j] = scan.nextInt();
                }
            }
            for (int i = 0; i < m; i++) {
                mtx2[i] = scan.nextInt();
            }
            
            for (int i = 0; i < n; i++) {   
                for (int j = 0; j < m; j++) {
                     ans[i] += mtx[i][j] * mtx2[j] ;
                }
                System.out.println(ans[i]);
             }
    }
} Main
import java.util.Scanner;

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