import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] nm = new int[]{sc.nextInt(), sc.nextInt()}; nm new int[]{sc.nextInt(), sc.nextInt()} int[][] a = new int[nm[0]][nm[1]]; a new int[nm[0]][nm[1]] nm[0] nm 0 nm[1] nm 1 int[] b = new int[nm[1]]; b new int[nm[1]] nm[1] nm 1 for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < nm[0] i nm[0] nm 0 i++ i++ i {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < nm[1] j nm[1] nm 1 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 < nm[1]; i++) {
            b[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < nm[1] i nm[1] nm 1 i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        } int i = 0; int i = 0; i 0 i < nm[0] i nm[0] nm 0 i++ i++ i {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        } {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        } int sum = 0; sum 0 for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            } int j = 0; int j = 0; j 0 j < nm[1] j nm[1] nm 1 j++ j++ j {
                sum += a[i][j] * b[j];
            } {
                sum += a[i][j] * b[j];
            } sum += a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nm = new int[]{sc.nextInt(), sc.nextInt()};
        int[][] a = new int[nm[0]][nm[1]];
        int[] b = new int[nm[1]];
        for (int i = 0; i < nm[0]; i++) {
            for (int j = 0; j < nm[1]; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < nm[1]; i++) {
            b[i] = sc.nextInt();
        }

        for (int i = 0; i < nm[0]; i++) {
            int sum = 0;
            for (int j = 0; j < nm[1]; j++) {
                sum += a[i][j] * b[j];
            }
            System.out.println(sum);
        }
    }
}