#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long v[100002];
  long long t[100002];
  long long sp[100002];
  int ends[100002];
  long long melt[100002];
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    ends[i] = 0;
    melt[i] = 0;
    long long a;
    scanf("%lld", &v[i]);
  }
  for (int i = 1; i <= n; ++i) {
    long long a;
    scanf("%lld", &t[i]);
  }
  sp[0] = 0;
  sp[1] = t[1];
  for (int i = 2; i <= n; ++i) {
    sp[i] = t[i] + sp[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    long long curv = v[i];
    if ((sp[n] - sp[i - 1]) != 0 && v[i] / (sp[n] - sp[i - 1]) > 0) {
      continue;
    }
    if (t[i] != 0 && v[i] / t[i] == 0) {
      ends[i]++;
      melt[i] += curv;
    } else {
      int a = i, b = n;
      while (b - a > 1) {
        int m = (a + b) / 2;
        if (sp[m] - sp[i - 1] == 0 || curv / (sp[m] - sp[i - 1]) > 0) {
          a = m;
        } else {
          b = m;
        }
      }
      int f = b;
      if (sp[f] - sp[i - 1] == 0 || curv / (sp[f] - sp[i - 1]) > 0) f++;
      ends[f]++;
      melt[f] += curv - (sp[f - 1] - sp[i - 1]);
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; ++i) {
    cnt += 1 - ends[i];
    melt[i] += t[i] * cnt;
    printf("%lld ", melt[i]);
  }
  return 0;
}
