import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] matrix = new int[n][m]; matrix new int[n][m] n m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		} {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		} for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int a = sc.nextInt();
				matrix[i][j] = a;
			} {
				int a = sc.nextInt();
				matrix[i][j] = a;
			} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc matrix[i][j] = a matrix[i][j] matrix[i] matrix i j a int[] vector = new int[m]; vector new int[m] m for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vector[i] = sc.nextInt();
		} {
			vector[i] = sc.nextInt();
		} vector[i] = sc.nextInt() vector[i] vector i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int[] calcdVector = new int[n]; calcdVector new int[n] n for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		} {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		} for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				calcdVector[i] += matrix[i][j] * vector[j];
			} {
				calcdVector[i] += matrix[i][j] * vector[j];
			} calcdVector[i] += matrix[i][j] * vector[j] calcdVector[i] calcdVector i matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			System.out.println(calcdVector[i]);
		} {
			System.out.println(calcdVector[i]);
		} System.out.println(calcdVector[i]) System.out.println System.out System System.out calcdVector[i] calcdVector i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

		for (int i = 0; i < n; i++) {
			System.out.println(calcdVector[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		final int m = sc.nextInt();

		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int a = sc.nextInt();
				matrix[i][j] = a;
			}
		}

		int[] vector = new int[m];
		for (int i = 0; i < m; i++) {
			vector[i] = sc.nextInt();
		}

		sc.close();

		int[] calcdVector = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				calcdVector[i] += matrix[i][j] * vector[j];
			}
		}

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