import java.util.Scanner;

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

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

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

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] A = new int[n][m]; A new int[n][m] n m int[][] B = new int[m][1]; B new int[m][1] m 1 for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        } 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] = Integer.parseInt(sc.next());
            }
        } {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        } for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                A[i][j] = Integer.parseInt(sc.next());
            } {
                A[i][j] = Integer.parseInt(sc.next());
            } A[i][j] = Integer.parseInt(sc.next()) A[i][j] A[i] A i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            B[i][0] = Integer.parseInt(sc.next());
        } {
            B[i][0] = Integer.parseInt(sc.next());
        } B[i][0] = Integer.parseInt(sc.next()) B[i][0] B[i] B i 0 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] C = new int[n][1]; C new int[n][1] n 1 for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        } {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        } for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                C[i][0] += A[i][j] * B[j][0];
            } {
                C[i][0] += A[i][j] * B[j][0];
            } C[i][0] += A[i][j] * B[j][0] C[i][0] C[i] C i 0 A[i][j] * B[j][0] A[i][j] A[i] A i j B[j][0] B[j] B j 0 for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(C[i][0]);
        } {
            System.out.println(C[i][0]);
        } System.out.println(C[i][0]) System.out.println System.out System System.out C[i][0] C[i] C i 0 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    }
} Main
import java.util.Scanner;

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

        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());

        int[][] A = new int[n][m];
        int[][] B = new int[m][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = Integer.parseInt(sc.next());
            }
        }

        for (int i = 0; i < m; i++) {
            B[i][0] = Integer.parseInt(sc.next());
        }

        int[][] C = new int[n][1];

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                C[i][0] += A[i][j] * B[j][0];
            }
        }

        for (int i = 0; i < n; i++) {
            System.out.println(C[i][0]);
        }
    }
}