import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    }


} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    }


} Main public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    } main {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn int m = scn.nextInt(); m scn.nextInt() scn.nextInt scn 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 Arrays.fill(c,0) Arrays.fill Arrays c 0 for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.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] = scn.nextInt();
            }
        } {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        } for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            } int j=0; int j=0; j 0 j < m j m j++ j++ j {
                a[i][j] = scn.nextInt();
            } {
                a[i][j] = scn.nextInt();
            } a[i][j] = scn.nextInt() a[i][j] a[i] a i j scn.nextInt() scn.nextInt scn for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            b[i] = scn.nextInt();
        } {
            b[i] = scn.nextInt();
        } b[i] = scn.nextInt() b[i] b i scn.nextInt() scn.nextInt scn 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 scn.close() scn.close scn String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    }


} public class Main {
    public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    }


} Main
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int m = scn.nextInt();

        int[][] a = new int[n][m];
        int b[] = new int[m];
        int c[] = new int[n];
        Arrays.fill(c,0);

        for (int i = 0; i < n; i++) {
            for (int j=0; j < m; j++) {
                a[i][j] = scn.nextInt();
            }
        }
        for (int i = 0; i < m; i++) {
            b[i] = scn.nextInt();
        }
        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]);
        }



        scn.close();

    }


}
