import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
} main {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int matrix[][] = new int[m][n]; matrix new int[m][n] m n int last[] = new int[m]; last new int[m] m int small[] = new int[n]; small new int[n] n for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		} {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		} for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				matrix[i][j] = scan.nextInt();
			} {
				matrix[i][j] = scan.nextInt();
			} matrix[i][j] = scan.nextInt() matrix[i][j] matrix[i] matrix i j scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			small[i] = scan.nextInt();
		} {
			small[i] = scan.nextInt();
		} small[i] = scan.nextInt() small[i] small i scan.nextInt() scan.nextInt scan int sum = 0; sum 0 for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		} {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		} for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} int p = 0; int p = 0; p 0 p < n p n p++ p++ p {
				sum += matrix[i][p] * small[p];
			} {
				sum += matrix[i][p] * small[p];
			} sum += matrix[i][p] * small[p] sum matrix[i][p] * small[p] matrix[i][p] matrix[i] matrix i p small[p] small p last[i] = sum last[i] last i sum sum = 0 sum 0 for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			System.out.println(last[i]);
		} {
			System.out.println(last[i]);
		} System.out.println(last[i]) System.out.println System.out System System.out last[i] last i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int m = scan.nextInt();
		int n = scan.nextInt();
		int matrix[][] = new int[m][n];
		int last[] = new int[m];
		int small[] = new int[n];
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				matrix[i][j] = scan.nextInt();
			}
		}
		for (int i = 0; i < n; i++) {
			small[i] = scan.nextInt();
		}
		int sum = 0;
		for (int i = 0; i < m; i++) {
			for (int p = 0; p < n; p++) {
				sum += matrix[i][p] * small[p];
			} last[i] = sum;
			sum = 0;
		}

		for (int i = 0; i < m; i++) {
			System.out.println(last[i]);
		}
}
}

