#include <cmath>
const int blen = 2;
const unsigned base = (int)1e2;
const int maxdep = 17;
const int mlen = 1 << maxdep;
#include "..\\base.cpp"
typedef long double dbl;
struct comp
{
dbl x, y;
comp() { }
comp( dbl a ) : x(cos(a)), y(sin(a)) { }
comp( dbl _x, dbl _y ) : x(_x), y(_y) { }
comp operator + ( const comp &p ) const { return comp(x + p.x, y + p.y); }
comp operator - ( const comp &p ) const { return comp(x - p.x, y - p.y); }
comp operator * ( const comp &p ) const { return comp(x * p.x - y * p.y, x * p.y + y * p.x); }
void out() { printf("%.10lf %.10lf\n", (double)x, (double)y); }
};
#define max_mem (mlen * 2)
int mpos = 0;
comp mem[max_mem];
comp x[mlen], y[mlen], z[mlen];
num a, b, c;
int sign = 1;
void FFT( int n, comp *a, comp *res )
{
if (n == 1)
{
res[0] = a[0];
return;
}
int n1 = n / 2;
comp *r0 = mem + mpos; mpos += n1;
comp *r1 = mem + mpos; mpos += n1;
comp *a0 = res;
comp *a1 = res + n1;
assert(mpos < max_mem);
forn(i, n)
if (i & 1)
a1[i >> 1] = a[i];
else
a0[i >> 1] = a[i];
FFT(n1, a0, r0);
FFT(n1, a1, r1);
comp t = comp(1.0, 0.0);
comp x = comp(2 * M_PI / n * sign);
forn(i, n)
{
res[i] = r0[i % n1] + t * r1[i % n1];
t = t * x;
}
mpos -= n;
}
void Cor( ll *c )
{
forn(i, mlen)
if (c[i] >= base)
c[i + 1] += c[i] / base, c[i] %= base;
}
int main()
{
Read(a);
Read(b);
int len = mlen, t = Len(a) + Len(b);
assert(t <= mlen);
while (len / 2 >= t)
len /= 2;
forn(i, len)
x[i] = comp(a[i], 0);
FFT(len, x, y);
forn(i, len)
x[i] = comp(b[i], 0);
FFT(len, x, z);
sign = -1;
forn(i, len)
x[i] = y[i] * z[i];
FFT(len, x, y);
forn(i, len)
c[i] = (int)(y[i].x / len + 0.5);
Cor(c);
Out(c);
return 0;
}