import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args){
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	} main {
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	} Scanner std = new Scanner(System.in); std new Scanner(System.in) int n = Integer.parseInt(std.next()); n Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std int m = Integer.parseInt(std.next()); m Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std int matrix[][] = new int[n][m]; matrix new int[n][m] n m for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		} int i=0; int i=0; i 0 i<=n-1 i n-1 n 1 i++ i++ i {
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		} {
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		} for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			} int j=0; int j=0; j 0 j<=m-1 j m-1 m 1 j++ j++ j {
				matrix[i][j] = Integer.parseInt(std.next());
			} {
				matrix[i][j] = Integer.parseInt(std.next());
			} matrix[i][j] = Integer.parseInt(std.next()) matrix[i][j] matrix[i] matrix i j Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std int vector[] = new int [m]; vector new int [m] m for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		} int k=0; int k=0; k 0 k<=m-1 k m-1 m 1 k++ k++ k {
			vector[k] = Integer.parseInt(std.next());
		} {
			vector[k] = Integer.parseInt(std.next());
		} vector[k] = Integer.parseInt(std.next()) vector[k] vector k Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		} int i=0; int i=0; i 0 i<=n-1 i n-1 n 1 i++ i++ i {
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		} {
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		} int ans = 0; ans 0 for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			} int j=0; int j=0; j 0 j<=m-1 j m-1 m 1 j++ j++ j {
				ans += matrix[i][j] * vector[j];
			} {
				ans += matrix[i][j] * vector[j];
			} ans += matrix[i][j] * vector[j] ans matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector 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 std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int m = Integer.parseInt(std.next());

		int matrix[][] = new int[n][m];
		for(int i=0; i<=n-1; i++){
			for(int j=0; j<=m-1; j++){
				matrix[i][j] = Integer.parseInt(std.next());
			}
		}

		int vector[] = new int [m];
		for(int k=0; k<=m-1; k++){
			vector[k] = Integer.parseInt(std.next());
		}

		for(int i=0; i<=n-1; i++){
			int ans = 0;
			for(int j=0; j<=m-1; j++){
				ans += matrix[i][j] * vector[j];
			}
			System.out.println(ans);
		}
	}
}