Alice likes snow a lot! Unfortunately, this year's winter is already over, and she can't expect to have any more of it. Bob has thus bought her a gift — a large snow maker. He plans to make some amount of snow every day. On day *i* he will make a pile of snow of volume *V*<sub class="lower-index">*i*</sub> and put it in her garden.

Each day, every pile will shrink a little due to melting. More precisely, when the temperature on a given day is *T*<sub class="lower-index">*i*</sub>, each pile will reduce its volume by *T*<sub class="lower-index">*i*</sub>. If this would reduce the volume of a pile to or below zero, it disappears forever. All snow piles are independent of each other. 

Note that the pile made on day *i* already loses part of its volume on the same day. In an extreme case, this may mean that there are no piles left at the end of a particular day.

You are given the initial pile sizes and the temperature on each day. Determine the total volume of snow melted on each day.
The first line contains a single integer *N* (1 ≤ *N* ≤ 10<sup class="upper-index">5</sup>) — the number of days. 

The second line contains *N* integers *V*<sub class="lower-index">1</sub>, *V*<sub class="lower-index">2</sub>, ..., *V*<sub class="lower-index">*N*</sub> (0 ≤ *V*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), where *V*<sub class="lower-index">*i*</sub> is the initial size of a snow pile made on the day *i*.

The third line contains *N* integers *T*<sub class="lower-index">1</sub>, *T*<sub class="lower-index">2</sub>, ..., *T*<sub class="lower-index">*N*</sub> (0 ≤ *T*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), where *T*<sub class="lower-index">*i*</sub> is the temperature on the day *i*.
In the first sample, Bob first makes a snow pile of volume 10, which melts to the size of 5 on the same day. On the second day, he makes another pile of size 10. Since it is a bit warmer than the day before, the first pile disappears completely while the second pile shrinks to 3. At the end of the second day, he has only a single pile of size 3. On the third day he makes a smaller pile than usual, but as the temperature dropped too, both piles survive till the end of the day.
3
10 10 5
5 7 2
5 12 4
5
30 25 20 15 10
9 10 12 4 13
9 20 35 11 25
4
0 0 0 0
1 2 3 4
0 0 0 0
10
11 39 16 34 25 3 12 11 31 16
10 0 4 9 8 9 7 8 9 2
10 0 9 27 27 30 28 17 12 4
10
20 35 4 0 6 29 4 9 17 10
0 9 4 7 5 1 4 3 9 4
0 18 12 14 10 3 12 9 26 12
1
4
5
4
1
5
4
4
1
5
5
5
2
9 3
8 2
8 3
2
9 3
4 4
4 7
2
9 3
10 2
9 2
13
1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1
import sys
import math
import collections
# sys.setrecursionlimit(10**6) 
# sys.setrecursionlimit(100000000)
inp    =lambda: int(input())
strng  =lambda: input().strip()
strl   =lambda: list(input().strip()) #
mulf   =lambda: map(float,input().strip().split()) #
seq    =lambda: list(map(int,input().strip().split())) #
mod = (10**9)+7
input=sys.stdin.readline
# print("Hello, World!", flush=True)
# ord("A") chr(65)
def bs(l,h,v):
    if(l<=h):
        m = (l+h)//2
        if(pret[m] < v):
            if(m ==h):
                return m
            else:
                return bs(m+1,h,v)
        else:
            if(m-1>=l and pret[m-1]>=v):
                return bs(l,m-1,v)
            return m
    return -1
n = inp()
v = seq()
t = seq()
pret = [0]*n
pret[0] = t[0]

for i in range(1,n):
    pret[i] = pret[i-1] + t[i]
# print(pret,"ppp")
freq = [0]*n
extra = [0]*n

for i in range(n):
    temp = v[i]
    if(i>0):
        temp += pret[i-1]
    
    val = bs(i,n-1,temp)
    # print(val,"indexx")
    if(val == i):
        if(temp >= pret[i]):
            freq[i] += 1
            if(i>0):
                freq[i-1] -= 1
        elif(temp < pret[i]):
            diff = pret[i] - temp
            extra[i] += t[i] - diff

        


    else:

        if(temp >= pret[val]):
            freq[val] += 1
            if(i>0):
                freq[i-1] -= 1
        elif(temp < pret[val]):
            # print(i)
            diff = pret[val] - temp
            extra[val] += t[val] - diff
            
            freq[val-1] += 1
            # print(val-1)
            if(i>0):
                freq[i-1] -= 1
    # print(freq,"ffff")
    # print(extra,"eeeee")
ans = [""]*n
curr = 0
# print(freq)
# print(extra)
for i in range(n-1,-1,-1):
    temp = freq[i]
    freq[i] += curr
    curr += temp

for i in range(n):
    temp = freq[i]*t[i] + extra[i]
    temp = str(temp)
    ans[i] = temp


print(" ".join(ans))


