#include using namespace std; #define ll long long int #define ull unsigned long long int #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ld long double #define vi vector #define pi pair #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back #define ff first #define ss second #define dbg(x) cout << #x << ": " << x #define clr(x,v) memset(x, v, sizeof(x)) #define fix(x) cout << setprecision(x) << fixed; #define fo(i,a,b) for(int i=(a);i<=(b);i++) templateistream& operator>>(istream& in, pair &a) {in >> a.fr >> a.sc; return in;} templateostream& operator<<(ostream& out, pair a) {out << a.fr << " " << a.sc; return out;} templateT amax(T &a, T1 b) {if (b > a)a = b; return a;} templateT amin(T &a, T1 b) {if (b < a)a = b; return a;} const double PI = acos(-1.0); const double eps = 1e-9; const ll mod = 1e9 + 7; const ld r = 1e9; const ll inf = 1e17; const int MAXN = 105; const int N = 1e5 + 5; ll max(ll a, ll b) { if (a > b) return a; else return b; } ll min(ll a, ll b) { if (a < b) return a; else return b; } ll power(ll a, ll p) { ll res = 1; while (p) { if (p & 1) { res = ((res) * (a) ) ; } a = ((a ) * (a)); p >>= 1; } return res; } bool p(string str) { int j = str.length() - 1; for (int i = 0; i < j; i++, j--) { if (str[i] != str[j]) { return false; } } return true; } void solve() { ll n, i, j, k, x; cin >> n; vi a(n + 1), b(n + 1), ans((2 * n) + 1, 0); for (i = 1; i <= n; i++) { cin >> a[i]; } for (i = 1; i <= n; i++) { cin >> b[i]; } for (i = 1; i <= n; i++) { for (j = 1; j <= n; j++) { ans[i + j] += (j * b[i] + i * a[j]); } } for (i = 1; i < 2 * n + 1; i++) { cout << ans[i] << " "; } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // #ifndef ONLINE_JUDGE // // For getting input from input.txt file // freopen("input.txt", "r", stdin); // // Printing the Output to output.txt file // freopen("output.txt", "w", stdout); // #endif ll t = 1; //cin >> t; //ll tt = 0; while (t--) { //tt++; solve(); } return 0; }