import java.util.Scanner;

//20180509
//02

public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    }
} Main public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    } main {
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner 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 y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		} int y = 0; int y = 0; y 0 y < n y n y++ y++ y {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		} {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		} for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			} int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
				a[y][x] = scanner.nextInt();
			} {
				a[y][x] = scanner.nextInt();
			} a[y][x] = scanner.nextInt() a[y][x] a[y] a y x scanner.nextInt() scanner.nextInt scanner for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		} int y = 0; int y = 0; y 0 y < m y m y++ y++ y {
			b[y] = scanner.nextInt();
		} {
			b[y] = scanner.nextInt();
		} b[y] = scanner.nextInt() b[y] b y scanner.nextInt() scanner.nextInt scanner for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		} int y = 0; int y = 0; y 0 y < n y n y++ y++ y {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		} {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		} int ans = 0; ans 0 for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			} int x = 0; int x = 0; x 0 x < m x m x++ x++ x {
				ans += a[y][x] * b[x];
			} {
				ans += a[y][x] * b[x];
			} ans += a[y][x] * b[x] ans a[y][x] * b[x] a[y][x] a[y] a y x b[x] b x System.out.println(ans) System.out.println System.out System System.out ans scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    }
} public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    }
} Main
import java.util.Scanner;

//20180509
//02

public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int[][] a = new int[n][m];
		int[] b = new int[m];

		for(int y = 0;y < n;y++) {
			for (int x = 0; x < m; x++) {
				a[y][x] = scanner.nextInt();
			}
		}

		for(int y = 0;y < m;y++) {
			b[y] = scanner.nextInt();
		}

		for(int y = 0;y < n;y++) {
			int ans = 0;
			for (int x = 0; x < m; x++) {
				ans += a[y][x] * b[x];
			}
			System.out.println(ans);
		}

		scanner.close();
    }
}
