import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    }
} Main public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    } main {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[][][] houses = new int[4][3][10]; houses new int[4][3][10] 4 3 10 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m int[] c = new int[n]; c new int[n] n for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	} {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	} for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
		int element = scan.nextInt();
		a[i][j] = element;
	    } {
		int element = scan.nextInt();
		a[i][j] = element;
	    } int element = scan.nextInt(); element scan.nextInt() scan.nextInt scan a[i][j] = element a[i][j] a[i] a i j element for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
	    int element = scan.nextInt();
	    b[i] = element;
	} {
	    int element = scan.nextInt();
	    b[i] = element;
	} int element = scan.nextInt(); element scan.nextInt() scan.nextInt scan b[i] = element b[i] b i element for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	} {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	} for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
		c[i] += a[i][j] * b[j];
	    } {
		c[i] += a[i][j] * b[j];
	    } c[i] += a[i][j] * b[j] c[i] c i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j System.out.println(c[i]) System.out.println System.out System System.out c[i] c i String[] args args public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    }
} public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int[][][] houses = new int[4][3][10];	
	int n = scan.nextInt();
	int m = scan.nextInt();
	int[][] a = new int[n][m];
	int[] b = new int[m];
	int[] c = new int[n];
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		int element = scan.nextInt();
		a[i][j] = element;
	    }
	}
	for (int i = 0; i < m; i++) {
	    int element = scan.nextInt();
	    b[i] = element;
	}
	for (int i = 0; i < n; i++) {
	    for (int j = 0; j < m; j++) {
		c[i] += a[i][j] * b[j];
	    }
	    System.out.println(c[i]);
	}
    }
}