#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643383;
long long mod = 1000000007;
int Ceil(int a, int b) {
  if (a % b == 0)
    return a / b;
  else
    return (a / b) + 1;
}
int main() {
  int n;
  cin >> n;
  vector<long long int> v(n, 0), t(n, 0), ans(n, 0), find(n, 0), pre(n, 0),
      temp(n, 0);
  for (long long i = 0; i < (n); ++i) {
    cin >> v[i];
    temp[i] = v[i];
  }
  for (long long i = 0; i < (n); ++i) {
    cin >> t[i];
    pre[i] = t[i];
  }
  for (long long i = 1; i <= (n - 1); ++i) {
    pre[i] += pre[i - 1];
    temp[i] += pre[i - 1];
  }
  for (long long i = 0; i < (n); ++i) {
    int idx = (upper_bound(pre.begin(), pre.end(), temp[i]) - pre.begin());
    find[i]++;
    if (idx <= n - 1) {
      find[idx]--;
      if (idx) ans[idx] += abs(pre[idx - 1] - temp[i]);
      if (idx == 0) ans[idx] = temp[i];
    }
  }
  for (long long i = 1; i <= (n - 1); ++i) {
    find[i] += find[i - 1];
  }
  for (long long i = 0; i < (n); ++i) {
    ans[i] += (find[i] * t[i]);
    cout << ans[i] << " ";
  }
}
