import java.util.Scanner;

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

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

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

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

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

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

        for(int i=0; i<n; i++) {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

        for(int i=0; i<n; i++) {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        }
    } 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[][] b1 = new int[n][m]; b1 new int[n][m] n m for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[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++) {
                b1[i][j] = sc.nextInt();
            }
        } {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        } for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                b1[i][j] = sc.nextInt();
            } {
                b1[i][j] = sc.nextInt();
            } b1[i][j] = sc.nextInt() b1[i][j] b1[i] b1 i j sc.nextInt() sc.nextInt sc int[] b2 = new int[m]; b2 new int[m] m for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            b2[i] = sc.nextInt();
        } {
            b2[i] = sc.nextInt();
        } b2[i] = sc.nextInt() b2[i] b2 i sc.nextInt() sc.nextInt sc sc.close() sc.close sc for(int i=0; i<n; i++) {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[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 += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        } {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        } int ans = 0; ans 0 for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                ans += b1[i][j] * b2[j];
            } {
                ans += b1[i][j] * b2[j];
            } ans += b1[i][j] * b2[j] ans b1[i][j] * b2[j] b1[i][j] b1[i] b1 i j b2[j] b2 j System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

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

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

        for(int i=0; i<n; i++) {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        }
    }
} Main
import java.util.Scanner;

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

        int[][] b1 = new int[n][m];
        for(int i=0; i<n; i++) {
            for(int j=0; j<m; j++) {
                b1[i][j] = sc.nextInt();
            }
        }
        int[] b2 = new int[m];
        for(int i=0; i<m; i++) {
            b2[i] = sc.nextInt();
        }
        sc.close();

        for(int i=0; i<n; i++) {
            int ans = 0;
            for(int j=0; j<m; j++) {
                ans += b1[i][j] * b2[j];
            }
            System.out.println(ans);
        }
    }
}

