import java.util.Scanner;


public class Main {
	

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[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 stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		}
		
		for(int i = 0; i < n; i++) {
			System.out.println(C[i]);
		}
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		}
		
		for(int i = 0; i < n; i++) {
			System.out.println(C[i]);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		}
		
		for(int i = 0; i < n; i++) {
			System.out.println(C[i]);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m = stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn int[][] A = new int[n][m]; A new int[n][m] n m int[] B = new int[m]; B 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++) {
				A[i][j] = stdIn.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		} {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		} for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			} int j = 0; int j = 0; j 0 j <  m j m j++ j++ j {
				A[i][j] = stdIn.nextInt();
			} {
				A[i][j] = stdIn.nextInt();
			} A[i][j] = stdIn.nextInt() A[i][j] A[i] A i j stdIn.nextInt() stdIn.nextInt stdIn for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			B[i] = stdIn.nextInt();
		} {
			B[i] = stdIn.nextInt();
		} B[i] = stdIn.nextInt() B[i] B i stdIn.nextInt() stdIn.nextInt stdIn for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[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] += A[i][j] * B[j];
			}
		} {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		} for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				C[i] += A[i][j] * B[j];
			} {
				C[i] += A[i][j] * B[j];
			} C[i] += A[i][j] * B[j] C[i] C i A[i][j] * B[j] A[i][j] A[i] A i j B[j] B 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 stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		}
		
		for(int i = 0; i < n; i++) {
			System.out.println(C[i]);
		}
	}

} public class Main {
	

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[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 stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		int[][] A = new int[n][m];
		int[] B = new int[m];
		int[] C = new int[n];
		for(int i = 0; i < n; i++) {
			for(int j = 0; j <  m; j++) {
				A[i][j] = stdIn.nextInt();
			}
		}
		for(int i = 0; i < m; i++) {
			B[i] = stdIn.nextInt();
		}
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < m; j++) {
				C[i] += A[i][j] * B[j];
			}
		}
		
		for(int i = 0; i < n; i++) {
			System.out.println(C[i]);
		}
	}

}