#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctype.h>
#define PI 3.1415926535

class complex {
private:
public:
    double real;
    double image;
    complex(double r = 0, double i = 0) : real(r), image(i) {}
    complex operator+(const complex &c) const {
        return complex(real + c.real, image + c.image);
    }
    complex operator-(const complex &c) const {
        return complex(real - c.real, image - c.image);
    }
    complex operator*(const complex &c) const {
        return complex(real * c.real - image * c.image, real * c.image + image * c.real);
    }
};

int read(void) {
    int ret = 0, sign = 1;
    char c;
    while (!isdigit(c = getchar())) {
        if (c == '-') {
            sign = -1;
        }
    }
    while (isdigit(c)) {
        ret = ret * 10 + c - '0';
        c = getchar();
    }
    return ret * sign;
}

void FFT(complex *poly, int m, int *rev, int sign) {
    for (int i = 0; i < m; i++) {
        if (i < rev[i]) {
            complex temp = poly[i];
            poly[i] = poly[rev[i]];
            poly[rev[i]] = temp;
        }
    }
    for (int mid = 1; mid < m; mid <<= 1) {
        complex wn(cos(PI / mid), sign * sin(PI / mid));
        for (int step = mid << 1, j = 0; j < m; j += step) {
            complex w(1, 0);
            for (int k = 0; k < mid; k++, w = w * wn) {
                complex x = poly[j + k], y = w * poly[j + k + mid];
                poly[j + k] = x + y;
                poly[j + k + mid] = x - y;
            }
        }
    }
}

int main(void) {
    int n, m = 1, k = 0;
    n = read();
    while (m < 2 * n + 2) {
        m <<= 1;
        k++;
    }

    complex *a = new complex[m];
    int *rev = new int[m];
    memset(rev, 0, m * sizeof(int));
    for (int i = 0; i <= n; i++) {
        a[i].real = read();
    }
    for (int i = 0; i <= n; i++) {
        a[i].image = read();
    }
    for (int i = 0; i < m; i++) {
        rev[i] = (i & 1) << (k - 1) | (rev[i >> 1] >> 1);
    }

    FFT(a, m, rev, 1);
    for (int i = 0; i < m; i++) {
        a[i] = a[i] * a[i];
    }
    FFT(a, m, rev, -1);
    for (int i = 0; i <= 2 * n; i++) {
        double temp = a[i].image / (m * 2);
        if (temp >= 0) {
            printf("%d\n", (int)(temp + 0.5));
        } else {
            printf("%d\n", (int)(temp - 0.5));
        }
    }
    delete[] a;
    delete[] rev;
    return 0;
}