import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    }
} import java.util.*; util.* java public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    } main {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] a = new int[n*m]; a new int[n*m] n*m n m int[] b = new int[m]; b new int[m] m int[] ret = new int[n]; ret new int[n] n for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n*m i n*m n m i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m 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 < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        } {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        } for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                ret[i] += a[i * m + j] * b[j];
            } {
                ret[i] += a[i * m + j] * b[j];
            } ret[i] += a[i * m + j] * b[j] ret[i] ret i a[i * m + j] * b[j] a[i * m + j] a i * m + j i * m i m j b[j] b j System.out.println(ret[i]) System.out.println System.out System System.out ret[i] ret i String[] args args public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    }
} public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    }
} Main
import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n*m];
        int[] b = new int[m];
        int[] ret = new int[n];
        for (int i = 0;i < n*m;i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0;i < m;i++) {
            b[i] = sc.nextInt();
        }
        for (int i = 0;i < n;i++) {
            for (int j = 0;j < m;j++) {
                ret[i] += a[i * m + j] * b[j];
            }
            System.out.println(ret[i]);
        }
        
    }
}