import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int retu = scanner.nextInt(); retu scanner.nextInt() scanner.nextInt scanner int gyou = scanner.nextInt(); gyou scanner.nextInt() scanner.nextInt scanner int[][] gyouretu1 = new int[retu][gyou]; gyouretu1 new int[retu][gyou] retu gyou int[][] gyouretu2 = new int[gyou][1]; gyouretu2 new int[gyou][1] gyou 1 for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        } int i = 0; int i = 0; i 0 i < retu i retu i++ i++ i {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        } {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        } for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            } int j = 0; int j = 0; j 0 j < gyou j gyou j++ j++ j {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            } {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            } int r = scanner.nextInt(); r scanner.nextInt() scanner.nextInt scanner gyouretu1[i][j] = r gyouretu1[i][j] gyouretu1[i] gyouretu1 i j r for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        } int j = 0; int j = 0; j 0 j < gyou j gyou j++ j++ j {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        } {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        } int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner gyouretu2[j][0] = b gyouretu2[j][0] gyouretu2[j] gyouretu2 j 0 b int goukei = 0; goukei 0 for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        } int i = 0; int i = 0; i 0 i < retu i retu i++ i++ i {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        } {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        } for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            } int j = 0; int j = 0; j 0 j < gyou j gyou j++ j++ j {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            } {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            } goukei += gyouretu1[i][j] * gyouretu2[j][0] goukei gyouretu1[i][j] * gyouretu2[j][0] gyouretu1[i][j] gyouretu1[i] gyouretu1 i j gyouretu2[j][0] gyouretu2[j] gyouretu2 j 0 System.out.println(goukei) System.out.println System.out System System.out goukei goukei=0 goukei 0 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int retu = scanner.nextInt();
        int gyou = scanner.nextInt();
        int[][] gyouretu1 = new int[retu][gyou];
        int[][] gyouretu2 = new int[gyou][1];
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                int r = scanner.nextInt();
                gyouretu1[i][j] = r;
            }
        }
        for (int j = 0; j < gyou; j++) {
            int b = scanner.nextInt();
            gyouretu2[j][0] = b;
        }
        int goukei = 0;
        for (int i = 0; i < retu; i++) {
            for (int j = 0; j < gyou; j++) {
                goukei += gyouretu1[i][j] * gyouretu2[j][0];
            }
            System.out.println(goukei);
            goukei=0;
        }
    }
}