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

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	}
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strAry = br.readLine().split(" "); strAry br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(strAry[0]); n Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 int m = Integer.parseInt(strAry[1]); m Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 int[][] matrix = new int[n][m]; matrix new int[n][m] n m int[] vector = new int[m]; vector new int[m] m for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		} {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		} String[] strMat = br.readLine().split(" "); strMat br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			} {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			} matrix[i][j] = Integer.parseInt(strMat[j]) matrix[i][j] matrix[i] matrix i j Integer.parseInt(strMat[j]) Integer.parseInt Integer strMat[j] strMat j for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			vector[i] = Integer.parseInt(br.readLine());
		} {
			vector[i] = Integer.parseInt(br.readLine());
		} vector[i] = Integer.parseInt(br.readLine()) vector[i] vector i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] c = new int[n]; c new int[n] n for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		} {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		} for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				c[i] += matrix[i][j] * vector[j];
				} {
				c[i] += matrix[i][j] * vector[j];
				} c[i] += matrix[i][j] * vector[j] c[i] c i matrix[i][j] * vector[j] matrix[i][j] matrix[i] matrix i j vector[j] vector j 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) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	}
} Main
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strAry = br.readLine().split(" ");
		int n = Integer.parseInt(strAry[0]);
		int m = Integer.parseInt(strAry[1]);
		int[][] matrix = new int[n][m];
		int[] vector = new int[m];
		for (int i = 0; i < n; i++) {
			String[] strMat = br.readLine().split(" ");
			for (int j = 0; j < m; j++) {
				matrix[i][j] = Integer.parseInt(strMat[j]);
			}
		}
		for (int i = 0; i < m; i++) {
			vector[i] = Integer.parseInt(br.readLine());
		}
		int[] c = new int[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				c[i] += matrix[i][j] * vector[j];
				}
			System.out.println(c[i]);
		}
	}
}