import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}

	// 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}

	// 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[][] A = new int[N][M]; A new int[N][M] N M int[]   b = new int[M]; b new int[M] M for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		} for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j< M j M j++ j++ j {
				A[i][j] = sc.nextInt();
			} {
				A[i][j] = sc.nextInt();
			} A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			b[i] = sc.nextInt();
		} {
			b[i] = sc.nextInt();
		} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int[] c = multiMV(A, b); c multiMV(A, b) multiMV A b for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			System.out.println(c[i]);
		} {
			System.out.println(c[i]);
		} System.out.println(c[i]) System.out.println System.out System System.out c[i] c i sc.close() sc.close sc String[] args args // 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	} multiMV {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	} int[] c = new int[A.length]; c new int[A.length] A.length A A.length for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		} int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i++ i++ i {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		} {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		} int e = 0; e 0 for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[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 {
				e += A[i][j] * b[j];
			} {
				e += A[i][j] * b[j];
			} e += A[i][j] * b[j] e A[i][j] * b[j] A[i][j] A[i] A i j b[j] b j c[i] = e c[i] c i e return c; c int[][] A A int[] b b public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}

	// 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}

	// 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[][] A = new int[N][M];
		int[]   b = new int[M];
		for(int i = 0; i < N; i++) {
			for(int j = 0; j< M; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		}
		int[] c = multiMV(A, b);
		for(int i = 0; i < c.length; i++) {
			System.out.println(c[i]);
		}
		sc.close();
	}

	// 行列とベクトルの掛け算
	public static int[] multiMV(int[][] A, int[] b) {
		int[] c = new int[A.length];
		for(int i = 0; i < A.length; i++) {
			int e = 0;
			for(int j = 0; j < A[i].length; j++) {
				e += A[i][j] * b[j];
			}
			c[i] = e;
		}
		return c;
	}
}
