import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} 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) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = 0; n 0 int m = 0; m 0 int[][] md; md int[] vd; vd String x = ""; x "" try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} x = in.readLine() x in.readLine() in.readLine in String[] nm = x.split(" "); nm x.split(" ") x.split x " " n = Integer.parseInt(nm[0]) n Integer.parseInt(nm[0]) Integer.parseInt Integer nm[0] nm 0 m = Integer.parseInt(nm[1]) m Integer.parseInt(nm[1]) Integer.parseInt Integer nm[1] nm 1 md = new int[n][m] md new int[n][m] n m vd = new int[m] vd new int[m] m for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			} {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			} x = in.readLine() x in.readLine() in.readLine in String[] row = x.split(" "); row x.split(" ") x.split x " " for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
					md[i][j] = Integer.parseInt(row[j]);
				} {
					md[i][j] = Integer.parseInt(row[j]);
				} md[i][j] = Integer.parseInt(row[j]) md[i][j] md[i] md i j Integer.parseInt(row[j]) Integer.parseInt Integer row[j] row j for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			} {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			} x = in.readLine() x in.readLine() in.readLine in vd[i] = Integer.parseInt(x) vd[i] vd i Integer.parseInt(x) Integer.parseInt Integer x for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			} {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			} int v = 0; v 0 for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
					v = v + md[i][j] * vd[j];
				} {
					v = v + md[i][j] * vd[j];
				} v = v + md[i][j] * vd[j] v v + md[i][j] * vd[j] v md[i][j] * vd[j] md[i][j] md[i] md i j vd[j] vd j System.out.println(v) System.out.println System.out System System.out v String[] args args public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    
		int n = 0;
		int m = 0;
		
		int[][] md;
		int[] vd;
		
		String x = "";
		try {
			x = in.readLine();
			String[] nm = x.split(" ");
			n = Integer.parseInt(nm[0]);
			m = Integer.parseInt(nm[1]);
			
			md = new int[n][m];
			vd = new int[m];
			
			for (int i = 0; i < n; i++) {
				x = in.readLine();
				String[] row = x.split(" ");
				for (int j = 0; j < m; j++) {
					md[i][j] = Integer.parseInt(row[j]);
				}
			}
			
			for (int i = 0; i < m; i++) {
				x = in.readLine();
				
				vd[i] = Integer.parseInt(x);
			}
			
			for (int i = 0; i < n; i++) {
				int v = 0;
				for (int j = 0; j < m; j++) {
					v = v + md[i][j] * vd[j];
				}
				System.out.println(v);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}