import java.util.*;

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

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