//Accepted
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
	static StringBuilder sb=new StringBuilder();
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	}
	
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	static StringBuilder sb=new StringBuilder();
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	}
	
} Main static StringBuilder sb=new StringBuilder(); sb new StringBuilder() public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String work[]=new String[2]; work new String[2] 2 int n; n int m; m try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		} catch(Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		} work=br.readLine().split("\\s+") work br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" n=Integer.parseInt(work[0]) n Integer.parseInt(work[0]) Integer.parseInt Integer work[0] work 0 m=Integer.parseInt(work[1]) m Integer.parseInt(work[1]) Integer.parseInt Integer work[1] work 1 int[][] A=new int[n][m]; A new int[n][m] n m int[] b=new int[m]; b new int[m] m String work2[]=new String[m]; work2 new String[m] m for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			} int x=0; int x=0; x 0 x<n x n x++ x++ x {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			} {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			} work2=br.readLine().split("\\s+") work2 br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				} int y=0; int y=0; y 0 y<m y m y++ y++ y {
					A[x][y]=Integer.parseInt(work2[y]);
				} {
					A[x][y]=Integer.parseInt(work2[y]);
				} A[x][y]=Integer.parseInt(work2[y]) A[x][y] A[x] A x y Integer.parseInt(work2[y]) Integer.parseInt Integer work2[y] work2 y for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			} int i=0; int i=0; i 0 i<m i m i++ i++ i {
				b[i]=Integer.parseInt(br.readLine());
			} {
				b[i]=Integer.parseInt(br.readLine());
			} b[i]=Integer.parseInt(br.readLine()) b[i] b i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			} int x=0; int x=0; x 0 x<n x n x++ x++ x {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			} {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			} int sum=0; sum 0 for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				} int y=0; int y=0; y 0 y<m y m y++ y++ y {
					sum += A[x][y]*b[y];
				} {
					sum += A[x][y]*b[y];
				} sum += A[x][y]*b[y] sum A[x][y]*b[y] A[x][y] A[x] A x y b[y] b y sb.append(sum) sb.append sb sum sb.append(String.format("%n", "")) sb.append sb String.format("%n", "") String.format String "%n" "" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main{
	static StringBuilder sb=new StringBuilder();
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	}
	
} public class Main{
	static StringBuilder sb=new StringBuilder();
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	}
	
} Main
//Accepted
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
	static StringBuilder sb=new StringBuilder();
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String work[]=new String[2];
		int n;
		int m;

		
		//入力
		try {
			//sample=Integer.parseInt(br.readLine());
			//nとmの入力
			work=br.readLine().split("\\s+");
			n=Integer.parseInt(work[0]);
			m=Integer.parseInt(work[1]);

			int[][] A=new int[n][m];
			int[] b=new int[m];
			
			//Aの入力
			String work2[]=new String[m];
			for(int x=0; x<n; x++) {
				work2=br.readLine().split("\\s+");
				for(int y=0; y<m; y++) {
					A[x][y]=Integer.parseInt(work2[y]);
				}
			}

			//bの入力
			for(int i=0; i<m; i++) {
				b[i]=Integer.parseInt(br.readLine());
			}
			
			//計算処理
			for(int x=0; x<n; x++) {
				int sum=0;
				for(int y=0; y<m; y++) {
					sum += A[x][y]*b[y];
				}
				sb.append(sum);
				sb.append(String.format("%n", ""));
			}

		}catch(Exception e) {
			e.printStackTrace();
		}
		
		//出力
		System.out.print(sb);
	}
	
}
