import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	} 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[][] list = new int[n][m]; list new int[n][m] n m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				list[i][j] = sc.nextInt();
			} {
				list[i][j] = sc.nextInt();
			} list[i][j] = sc.nextInt() list[i][j] list[i] list i j sc.nextInt() sc.nextInt sc int[] list2 = new int[m]; list2 new int[m] m for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				list2[i] = sc.nextInt();
		} {
				list2[i] = sc.nextInt();
		} list2[i] = sc.nextInt() list2[i] list2 i sc.nextInt() sc.nextInt sc int ans; ans for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		} {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		} ans = 0 ans 0 for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				ans += list[i][j] * list2[j];
			} {
				ans += list[i][j] * list2[j];
			} ans += list[i][j] * list2[j] ans list[i][j] * list2[j] list[i][j] list[i] list i j list2[j] list2 j System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//3
		int m = sc.nextInt();//4
		int[][] list = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				list[i][j] = sc.nextInt();
			}
		}
		int[] list2 = new int[m];
		for (int i = 0; i < m; i++) {
				list2[i] = sc.nextInt();
		}
int ans;
		for(int i = 0; i < n; i++) {
			ans = 0;
			for(int j = 0; j < m; j++) {
				ans += list[i][j] * list2[j];
			}
			System.out.println(ans);
		}
	}
}

