import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	} main {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	} BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String arraynum = br.readLine(); arraynum br.readLine() br.readLine br String[] ary = arraynum.split(" "); ary arraynum.split(" ") arraynum.split arraynum " " int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])]; a new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])] Integer.parseInt(ary[0]) Integer.parseInt Integer ary[0] ary 0 Integer.parseInt(ary[1]) Integer.parseInt Integer ary[1] ary 1 int[] v = new int[Integer.parseInt(ary[1])]; v new int[Integer.parseInt(ary[1])] Integer.parseInt(ary[1]) Integer.parseInt Integer ary[1] ary 1 int[] ans = new int[Integer.parseInt(ary[0])]; ans new int[Integer.parseInt(ary[0])] Integer.parseInt(ary[0]) Integer.parseInt Integer ary[0] ary 0 for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		} int i = 0 ; int i = 0 ; i 0 i < a.length i a.length a a.length i++ i++ i {
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		} {
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		} String num = br.readLine(); num br.readLine() br.readLine br String[] numa = num.split(" "); numa num.split(" ") num.split num " " for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			} int j = 0 ; int j = 0 ; j 0 j < a[i].length j a[i].length a[i] a i a[i].length j++ j++ j {
				a[i][j] = Integer.parseInt(numa[j]);
			} {
				a[i][j] = Integer.parseInt(numa[j]);
			} a[i][j] = Integer.parseInt(numa[j]) a[i][j] a[i] a i j Integer.parseInt(numa[j]) Integer.parseInt Integer numa[j] numa j for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		} int i = 0 ; int i = 0 ; i 0 i < v.length i v.length v v.length i++ i++ i {
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		} {
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		} String vect = br.readLine(); vect br.readLine() br.readLine br v[i] = Integer.parseInt(vect) v[i] v i Integer.parseInt(vect) Integer.parseInt Integer vect for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		} int i = 0 ; int i = 0 ; i 0 i < a.length i a.length a a.length i++ i++ i {
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		} {
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		} for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			} int j = 0 ; int j = 0 ; j 0 j < a[i].length j a[i].length a[i] a i a[i].length j++ j++ j {
				ans[i] = a[i][j]*v[j] + ans[i];
			} {
				ans[i] = a[i][j]*v[j] + ans[i];
			} ans[i] = a[i][j]*v[j] + ans[i] ans[i] ans i a[i][j]*v[j] + ans[i] a[i][j]*v[j] a[i][j] a[i] a i j v[j] v j ans[i] ans i System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String arraynum = br.readLine();
		String[] ary = arraynum.split(" ");
		int[][] a = new int[Integer.parseInt(ary[0])][Integer.parseInt(ary[1])];
		int[] v = new int[Integer.parseInt(ary[1])];
		int[] ans = new int[Integer.parseInt(ary[0])];
		for(int i = 0 ; i < a.length ; i++){
			String num = br.readLine();
			String[] numa = num.split(" ");
			for(int j = 0 ; j < a[i].length ; j++){
				a[i][j] = Integer.parseInt(numa[j]);
			}
		}
		
		for (int i = 0 ; i < v.length ; i++){
			String vect = br.readLine();
			v[i] = Integer.parseInt(vect);
		}
		for(int i = 0 ; i < a.length ; i++){
			for(int j = 0 ; j < a[i].length ; j++){
				ans[i] = a[i][j]*v[j] + ans[i];
			}
			System.out.println(ans[i]);
		}

	}

}