import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    }
}
 import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    }
} Main public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    } main {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    } int inN inN inM; inM int[] vec; vec int[][] mat; mat int[] ans; ans Scanner scan = new Scanner(System.in); scan new Scanner(System.in) inN = Integer.parseInt(scan.next()) inN Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan inM = Integer.parseInt(scan.next()) inM Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan vec = new int[inM] vec new int[inM] inM ans = new int[inN] ans new int[inN] inN mat = new int[inN][inM] mat new int[inN][inM] inN inM for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        } int i = 0; int i = 0; i 0 i < inN i inN i++ i++ i {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        } {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        } for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            } int j = 0; int j = 0; j 0 j < inM j inM j++ j++ j {
                mat[i][j] = Integer.parseInt(scan.next());
            } {
                mat[i][j] = Integer.parseInt(scan.next());
            } mat[i][j] = Integer.parseInt(scan.next()) mat[i][j] mat[i] mat i j Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next()); int i = 0; int i = 0; i 0 i < inM i inM i++ i++ i vec[i] = Integer.parseInt(scan.next()); vec[i] = Integer.parseInt(scan.next()) vec[i] vec i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        } int i = 0; int i = 0; i 0 i < inN i inN i++ i++ i {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        } {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        } int sum = 0; sum 0 for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            } int j = 0; int j = 0; j 0 j < inM j inM j++ j++ j {
                sum += mat[i][j] * vec[j];
            } {
                sum += mat[i][j] * vec[j];
            } sum += mat[i][j] * vec[j] sum mat[i][j] * vec[j] mat[i][j] mat[i] mat i j vec[j] vec j ans[i] = sum ans[i] ans i sum for (int i = 0; i < inN; i++) System.out.println(ans[i]); int i = 0; int i = 0; i 0 i < inN i inN i++ i++ i System.out.println(ans[i]); System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main {

    public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    }
} public class Main {

    public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int inN, inM;
        int[] vec;
        int[][] mat;
        int[] ans;
        Scanner scan = new Scanner(System.in);

        inN = Integer.parseInt(scan.next());
        inM = Integer.parseInt(scan.next());

        vec = new int[inM];
        ans = new int[inN];
        mat = new int[inN][inM];

        for (int i = 0; i < inN; i++) {
            for (int j = 0; j < inM; j++) {
                mat[i][j] = Integer.parseInt(scan.next());
            }
        }
        for (int i = 0; i < inM; i++) vec[i] = Integer.parseInt(scan.next());

        for (int i = 0; i < inN; i++) {
            int sum = 0;
            for (int j = 0; j < inM; j++) {
                sum += mat[i][j] * vec[j];
            }
            ans[i] = sum;
        }

        for (int i = 0; i < inN; i++) System.out.println(ans[i]);

    }
}

