import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	}

} 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();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	} 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 lineA[][] = new int[n][m]; lineA new int[n][m] n m int lineB[] = new int[m]; lineB 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++) {
				lineA[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++) {
				lineA[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				lineA[i][j] = sc.nextInt();
			} {
				lineA[i][j] = sc.nextInt();
			} lineA[i][j] = sc.nextInt() lineA[i][j] lineA[i] lineA i j sc.nextInt() sc.nextInt sc for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			lineB[i] = sc.nextInt();
		} {
			lineB[i] = sc.nextInt();
		} lineB[i] = sc.nextInt() lineB[i] lineB i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		} {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		} for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c[i] += lineA[i][j] * lineB[j];
			} {
				c[i] += lineA[i][j] * lineB[j];
			} c[i] += lineA[i][j] * lineB[j] c[i] c i lineA[i][j] * lineB[j] lineA[i][j] lineA[i] lineA i j lineB[j] lineB j for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} 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 sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		int lineA[][] = new int[n][m];
		int lineB[] = new int[m];
		int c[] = new int[n];

		// a???????????????????¨????
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				lineA[i][j] = sc.nextInt();
			}
		}
		// b????´??????????????¨????
		for (int i = 0; i < m; i++) {
			lineB[i] = sc.nextInt();
		}

		// ????¨?
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += lineA[i][j] * lineB[j];
			}
		}

		// ??????
		for (int i = 0; i < n; i++) {
			System.out.println(c[i]);
		}
	}

}