import java.util.*;

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

		for (int L = 0; L < n; L++) {
			int c = 0;
			for (int P = 0; P < m; P++) {
				c = nums[L][P] * vector[P] + c;
			}
			System.out.println(c);
		}
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] nums = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int k = 0; k < m; k++) {
				int a = sc.nextInt();
				nums[i][k] = a;
			}
		}
		
		int[] vector = new int[m];
		for (int j = 0; j < m; j++) {
			int b = sc.nextInt();
			vector[j] = b;
		}

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

		for (int L = 0; L < n; L++) {
			int c = 0;
			for (int P = 0; P < m; P++) {
				c = nums[L][P] * vector[P] + c;
			}
			System.out.println(c);
		}
    } main {
Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[][] nums = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int k = 0; k < m; k++) {
				int a = sc.nextInt();
				nums[i][k] = a;
			}
		}
		
		int[] vector = new int[m];
		for (int j = 0; j < m; j++) {
			int b = sc.nextInt();
			vector[j] = b;
		}

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

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

		for (int L = 0; L < n; L++) {
			int c = 0;
			for (int P = 0; P < m; P++) {
				c = nums[L][P] * vector[P] + c;
			}
			System.out.println(c);
		}
    }
} Main
import java.util.*;

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

		for (int L = 0; L < n; L++) {
			int c = 0;
			for (int P = 0; P < m; P++) {
				c = nums[L][P] * vector[P] + c;
			}
			System.out.println(c);
		}
    }
}

