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

public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			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) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} Main public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String a = reader.readLine(); a reader.readLine() reader.readLine reader String[] b = a.split(" "); b a.split(" ") a.split a " " int c = Integer.parseInt(b[0]); c Integer.parseInt(b[0]) Integer.parseInt Integer b[0] b 0 int d = Integer.parseInt(b[1]); d Integer.parseInt(b[1]) Integer.parseInt Integer b[1] b 1 String[] e = new String[d]; e new String[d] d int[][] f = new int[c][d]; f new int[c][d] c d for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			} int g = 0; int g = 0; g 0 g < c g c g++ g++ g {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			} {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			} a = reader.readLine() a reader.readLine() reader.readLine reader e = a.split(" ") e a.split(" ") a.split a " " for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				} int h = 0; int h = 0; h 0 h < d h d h++ h++ h {
					f[g][h] = Integer.parseInt(e[h]);
				} {
					f[g][h] = Integer.parseInt(e[h]);
				} f[g][h] = Integer.parseInt(e[h]) f[g][h] f[g] f g h Integer.parseInt(e[h]) Integer.parseInt Integer e[h] e h int[] i = new int[d]; i new int[d] d for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			} int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			} {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			} a = reader.readLine() a reader.readLine() reader.readLine reader i[j] = Integer.parseInt(a) i[j] i j Integer.parseInt(a) Integer.parseInt Integer a int k = 0; k 0 for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			} int l = 0; int l = 0; l 0 l < c l c l++ l++ l {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			} {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			} for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				} int m = 0; int m = 0; m 0 m < d m d m++ m++ m {
					k += f[l][m] * i[m];
				} {
					k += f[l][m] * i[m];
				} k += f[l][m] * i[m] k f[l][m] * i[m] f[l][m] f[l] f l m i[m] i m System.out.println(k) System.out.println System.out System System.out k k = 0 k 0 String[] args args public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

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

public class Main {
	
	public static void main(String[] args) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String a = reader.readLine();
			String[] b = a.split(" ");
			int c = Integer.parseInt(b[0]);
			int d = Integer.parseInt(b[1]);
			String[] e = new String[d];
			int[][] f = new int[c][d];
			for (int g = 0; g < c; g++) {
				a = reader.readLine();
				e = a.split(" ");
				for (int h = 0; h < d; h++) {
					f[g][h] = Integer.parseInt(e[h]);
				}
			}
			
			int[] i = new int[d];
			for (int j = 0; j < d; j++) {
				a = reader.readLine();
				i[j] = Integer.parseInt(a);
			}
			int k = 0;
			for (int l = 0; l < c; l++) {
				for (int m = 0; m < d; m++) {
					k += f[l][m] * i[m];
				}
				System.out.println(k);
				k = 0;
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}