A. Alfajores
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Seba is the manager of the Paper Airplanes Workshop (TAP, the acronym in Spanish), a very large company dedicated to the art of origami. TAP has a very large building with $$$M$$$ offices. In the $$$i$$$-th office, there are $$$E_i$$$ employees working.

Due to the high demand for their product, Seba travels constantly. When he returns from his trips, he usually brings a large box of alfajores to share with his employees.

To distribute them, he visits each of the $$$M$$$ offices of the company in order, from $$$1$$$ to $$$M$$$.

When he arrives at the $$$i$$$-th office, he distributes as many alfajores as possible equally among the $$$E_i$$$ employees of the office. After distributing them, he takes the box with the remaining alfajores and moves on to the next office.

Once he has visited all the offices, he sits at his desk and enjoys the remaining alfajores.

Seba is afraid of overindulging in sweets, so he needs to know how many alfajores he has consumed. The problem is that he does not keep track of the amount left in the box after each distribution corresponding to each trip. Luckily, he has the $$$N$$$ tickets corresponding to the alfajores purchases, and since he knows how many people work in each office, he is sure that you can calculate those quantities for him.

Input

The first line contains two integers $$$N$$$ and $$$M$$$ ($$$1 \leq N, M \leq 10^{5}$$$), representing the number of trips Seba made and the number of offices in TAP.

The second line contains $$$N$$$ integers $$$A_1, A_2, \ldots, A_N$$$ ($$$1 \leq A_i \leq 10^9$$$), where $$$A_i$$$ is the number of alfajores Seba bought on the $$$i$$$-th trip.

Finally, the third line contains $$$M$$$ integers $$$E_1, E_2, \ldots, E_M$$$ ($$$1 \leq E_i \leq 10^9$$$), where $$$E_i$$$ is the number of people working in the $$$i$$$-th office.

Output

A single line with $$$N$$$ integers, the quantities of alfajores that remained in the box after the distribution corresponding to each of Seba's trips.

Examples
Input
3 3
140 79 5
90 42 5
Output
3 2 0
Input
10 8
120 456 7458 84 123 84 213 185 987 654
97 73 61 41 52 23 11 7
Output
0 0 2 0 3 0 1 4 6 0
Note

In the first example, Seba brings $$$79$$$ alfajores on the second trip and when passing through the first floor, as there is not enough for each employee to take one, none of them receive alfajores. When passing through the second floor, each one takes $$$1$$$ alfajor, leaving $$$37$$$ in the box. Finally, he arrives at the third floor where each employee takes $$$7$$$, leaving $$$2$$$ alfajores for Seba.