import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
}
} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
} main {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan int m=scan.nextInt(); m scan.nextInt() scan.nextInt scan int a[][] = new int[100][100]; a new int[100][100] 100 100 int b[]= new int[100]; b new int[100] 100 int sum[]=new int[100]; sum new int[100] 100 int i i j; j for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		} {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		} for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				int c=scan.nextInt();
				a[i][j] +=c;
			} {
				int c=scan.nextInt();
				a[i][j] +=c;
			} int c=scan.nextInt(); c scan.nextInt() scan.nextInt scan a[i][j] +=c a[i][j] a[i] a i j c for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		} i=0; i=0 i 0 i<m i m i++ i++ i {
			int c=scan.nextInt();
			b[i] +=c;
		} {
			int c=scan.nextInt();
			b[i] +=c;
		} int c=scan.nextInt(); c scan.nextInt() scan.nextInt scan b[i] +=c b[i] b i c for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		} {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		} for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			} j=0; j=0 j 0 j<m j m j++ j++ j {
				sum[i] +=a[i][j]*b[j];
			} {
				sum[i] +=a[i][j]*b[j];
			} sum[i] +=a[i][j]*b[j] sum[i] sum i a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.println(""+sum[i]) System.out.println System.out System System.out ""+sum[i] "" sum[i] sum i scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
}
} public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int a[][] = new int[100][100];
		int b[]= new int[100];
		int sum[]=new int[100];
		int i,j;
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				int c=scan.nextInt();
				a[i][j] +=c;
			}
		}
		for(i=0;i<m;i++) {
			int c=scan.nextInt();
			b[i] +=c;
		}
		for(i=0;i<n;i++) {
			for(j=0;j<m;j++) {
				sum[i] +=a[i][j]*b[j];
			}
			System.out.println(""+sum[i]);
		}
		scan.close();
}
}
