import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	}
} Main public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	} main {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int sum; sum int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int matrix_A[][] = new int[n][m]; matrix_A new int[n][m] n m int Vector_b[] = new int[m]; Vector_b new int[m] m int Vector_c[] = new int[n]; Vector_c new int[n] n for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		} {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		} for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrix_A[i][j] = scan.nextInt();
			} {
				matrix_A[i][j] = scan.nextInt();
			} matrix_A[i][j] = scan.nextInt() matrix_A[i][j] matrix_A[i] matrix_A i j scan.nextInt() scan.nextInt scan for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			Vector_b[i] = scan.nextInt();
		} {
			Vector_b[i] = scan.nextInt();
		} Vector_b[i] = scan.nextInt() Vector_b[i] Vector_b i scan.nextInt() scan.nextInt scan for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		} {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		} sum = 0 sum 0 for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				sum += matrix_A[i][j] * Vector_b[j];
			} {
				sum += matrix_A[i][j] * Vector_b[j];
			} sum += matrix_A[i][j] * Vector_b[j] sum matrix_A[i][j] * Vector_b[j] matrix_A[i][j] matrix_A[i] matrix_A i j Vector_b[j] Vector_b j Vector_c[i] = sum Vector_c[i] Vector_c i sum System.out.println(Vector_c[i]) System.out.println System.out System System.out Vector_c[i] Vector_c i String [] args args public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	}
} public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		int sum;
		int n = scan.nextInt();
		int m = scan.nextInt();
		
		int matrix_A[][] = new int[n][m];
		int Vector_b[] = new int[m];
		int Vector_c[] = new int[n];
		
		for( int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				matrix_A[i][j] = scan.nextInt();
			}
		}
		
		for( int i = 0; i < m; i++) {
			Vector_b[i] = scan.nextInt();
		}
		
		for( int i = 0; i < n; i++) {
			sum = 0;
			for( int j = 0; j < m; j++) {
				sum += matrix_A[i][j] * Vector_b[j];
			}
			Vector_c[i] = sum;
			System.out.println(Vector_c[i]);
		}
		
	}
} Main
import java.util.Scanner;

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

