import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	}
} Main public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int[][] v = new int[x][y]; v new int[x][y] x y int[] a = new int[y]; a new int[y] y for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		} int i=0; int i=0; i 0 i<x i x i++ i++ i {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		} {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		} for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			} int j=0; int j=0; j 0 j<y j y j++ j++ j {
				v[i][j] = sc.nextInt();
			} {
				v[i][j] = sc.nextInt();
			} v[i][j] = sc.nextInt() v[i][j] v[i] v i j sc.nextInt() sc.nextInt sc for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<y i y i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int tmp = 0; tmp 0 for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		} int i=0; int i=0; i 0 i<x i x i++ i++ i {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		} {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		} for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			} int j=0; int j=0; j 0 j<y j y j++ j++ j {
				tmp += v[i][j] * a[j];
			} {
				tmp += v[i][j] * a[j];
			} tmp += v[i][j] * a[j] tmp v[i][j] * a[j] v[i][j] v[i] v i j a[j] a j System.out.println(tmp) System.out.println System.out System System.out tmp tmp = 0 tmp 0 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();

		int[][] v = new int[x][y];
		int[] a = new int[y];

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				v[i][j] = sc.nextInt();
			}
		}

		for(int i=0;i<y;i++) {
			a[i] = sc.nextInt();
		}

		int tmp = 0;

		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				tmp += v[i][j] * a[j];
			}
			System.out.println(tmp);
			tmp = 0;
		}
		sc.close();
	}
}
