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 Vi 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 Ti, each pile will reduce its volume by Ti. 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. 

Input

The first line contains a single integer N (1 ≤ N ≤ 105) — the number of days. 

The second line contains N integers V1, V2, ..., VN (0 ≤ Vi ≤ 109), where Vi is the initial size of a snow pile made on the day i.

The third line contains N integers T1, T2, ..., TN (0 ≤ Ti ≤ 109), where Ti is the temperature on the day i.

Output

Output a single line with N integers, where the i-th integer represents the total volume of snow melted on day i.

Examples

Input

3
10 10 5
5 7 2


Output

5 12 4


Input

5
30 25 20 15 10
9 10 12 4 13


Output

9 20 35 11 25

Note

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.

import java.io.*;
import java.util.*;

public class test3 {
	static class point{
		int i;int j;
		point(int i,int  j){
			this.i = i;
			this.j = j;
		}
	}
static long mod = (int)10e9 +7;
	public static void main(String[] args) throws  IOException {
		FastReader f = new FastReader();
		int n = f.nextInt();
		int v[] = new int[n];
		int t[] = new int[n];
		for(int i = 0;i<n;i++) {
			v[i] =f.nextInt();
		}
		for(int i = 0;i<n;i++)t[i] = f.nextInt();
		long pre[] = new long[n];
		pre[0] = t[0];
		for(int i = 1;i<n;i++) {
			pre[i] = t[i]+pre[i-1];
		}
		int diff[] = new int[n+1];
		long ret[] = new long[n];
		for(int i = 0;i<n;i++) {
			if(v[i]<=t[i]) {
				ret[i]+=v[i];
			}else {
				int l = i,r = n-1;
				long m  = i==0?0:pre[i-1];
				while(l<r) {
					int mid = (l+r)/2;
					if(pre[mid]-m<=v[i]) {
						l = mid+1;
					}else {
						r = mid;
					}
				}if(pre[l]-m<=v[i]) {
					l++;
				}if(l<n)
				ret[l]+=v[i]-pre[l-1]+m;
				diff[i]++;diff[l]--;
				//System.out.println(i+" = "+l);
			}
		}
		int curr = 0;
		for(int i = 0;i<n;i++) {
			curr+=diff[i];
			ret[i]+=(curr*(long)t[i]);
		}
		for(long e:ret) {
			System.out.print(e+" ");
		}
    }

	static boolean isPrime(int n)
    {
 
        // Check if number is less than
        // equal to 1
        if (n <= 1)
            return false;
 
        // Check if number is 2
        else if (n == 2)
            return true;
 
        // Check if n is a multiple of 2
        else if (n % 2 == 0)
            return false;
 
        // If not, then just check the odds
        for (int i = 3; i <= Math.sqrt(n); i += 2)
        {
            if (n % i == 0)
                return false;
        }
        return true;
    }
	
	static void print(int x,int y,int d,int n) {
		int i = 0;
		System.out.print(x+" "+y+" ");
			for(int j = x+d;j<y;j+=d) {
				System.out.print(j+" ");
				i++;
			}
			for(int j = x-d;j>0;j-=d) {
				if(i==n)return;
				System.out.print(j+" ");
				i++;
			}
			for(int j = y+d;j<1000000000;j+=d) {
				if(i==n)return;
				System.out.print(j+" ");
				i++;
			}
	}

	static int prime(int n){
	    int ret = 0;
	    while(n%2==0){
	        ret++;
	        n/=2;
	    }
	    for(int i=3;i<=Math.sqrt(n);i+=2){
	        while(n%i==0){
	            ret++;
	            n/=i;
	        }
	    }
	    if(n>2)ret++;
	    return ret;
	}
	static long nCr(int n, int r) 
	{ if(n<r) {
		return 0;
	} 
	    long[] C=new long[r+1]; 
	    C[0] = 1; 
	    for (int i = 1; i <= n; i++) 
	    {  
	        for (int j = Math.min(i, r); j > 0; j--) 
	            C[j] = (C[j] + C[j-1]); 
	    } 
	    return C[r]; 
	}
	static int power(int a,int n, int p)
    {
        int res = 1;
        a = a % p; 
        while (n > 0)
        {
            if ((n & 1) == 1)
                res = (res * a) % p;
            n = n >> 1; 
            a = (a * a) % p;
        }
        return res;
    }
    static boolean isPrime(int n, int k)
    {
    if (n <= 1 || n == 4) return false;
    if (n <= 3) return true;
    while (k > 0)
    {
        int a = 2 + (int)(Math.random() % (n - 4)); 
        if (power(a, n - 1, n) != 1)
            return false;
     
        k--;
        }
     
        return true;
    }
	  static long GCD(long a,long b) {
		  if(a%b==0)return b;
		  else return GCD(b,a%b);
	  }
		static ArrayList<Integer> readArray(FastReader f,int size){
			ArrayList<Integer> ret = new ArrayList<Integer>();
			for(int i=0;i<size;i++) {
				ret.add(f.nextInt());
			}return ret;
		}
	 static class FastReader 
	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	 

 }



